File tree Expand file tree Collapse file tree 4 files changed +21
-5
lines changed
Expand file tree Collapse file tree 4 files changed +21
-5
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ $ cfg = require __DIR__ . '/../vendor/mediawiki/mediawiki-phan-config/src/config-library.php ' ;
4+
5+ $ cfg ['directory_list ' ][] = 'tests ' ;
6+
7+ return $ cfg ;
Original file line number Diff line number Diff line change 3232 },
3333 "require-dev" : {
3434 "mediawiki/mediawiki-codesniffer" : " 41.0.0" ,
35+ "mediawiki/mediawiki-phan-config" : " 0.12.1" ,
3536 "mediawiki/minus-x" : " 1.1.1" ,
3637 "ockcyp/covers-validator" : " 1.6.0" ,
3738 "php-parallel-lint/php-console-highlighter" : " 1.0.0" ,
4041 },
4142 "scripts" : {
4243 "test" : [
43- " parallel-lint . --exclude vendor" ,
44- " phpunit" ,
45- " covers-validator" ,
44+ " @lint" ,
45+ " @phan" ,
46+ " @phpunit"
47+ ],
48+ "lint" : [
49+ " parallel-lint . --exclude vendor --exclude node_modules" ,
4650 " @phpcs" ,
47- " minus-x check ."
51+ " minus-x check ." ,
52+ " covers-validator"
4853 ],
54+ "phan" : " phan --allow-polyfill-parser" ,
55+ "phpunit" : " phpunit" ,
4956 "cover" : " phpunit --coverage-html coverage" ,
5057 "fix" : [
5158 " minus-x fix ." ,
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public static function newFromObject( $object ) {
5050 * Allow access to non-public static methods and properties of the class.
5151 * Returns an object whose methods/properties will correspond to the
5252 * static methods/properties of the given class.
53- * @param string $className
53+ * @param class- string $className
5454 * @return self
5555 * @throws InvalidArgumentException
5656 */
Original file line number Diff line number Diff line change @@ -20,11 +20,13 @@ protected function setUp(): void {
2020
2121 public function testConstructorException () {
2222 $ this ->expectException ( \InvalidArgumentException::class );
23+ // @phan-suppress-next-line PhanTypeMismatchArgumentProbablyReal
2324 TestingAccessWrapper::newFromObject ( WellProtectedClass::class );
2425 }
2526
2627 public function testStaticConstructorException () {
2728 $ this ->expectException ( \InvalidArgumentException::class );
29+ // @phan-suppress-next-line PhanTypeMismatchArgumentProbablyReal
2830 TestingAccessWrapper::newFromClass ( new WellProtectedClass () );
2931 }
3032
You can’t perform that action at this time.
0 commit comments