-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14c45e5
commit 5b6a902
Showing
7 changed files
with
91 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: PHPStan | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**.php' | ||
- 'phpstan.neon.dist' | ||
pull_request: | ||
paths: | ||
- '**.php' | ||
- 'phpstan.neon.dist' | ||
|
||
|
||
jobs: | ||
phpstan: | ||
name: phpstan | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' | ||
coverage: none | ||
|
||
- name: Install composer dependencies | ||
uses: ramsey/composer-install@v2 | ||
|
||
- name: Run PHPStan | ||
run: ./vendor/bin/phpstan --error-format=github |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Parameter \\#1 \\$callback of function array_map expects \\(callable\\(PhpParser\\\\Node\\)\\: mixed\\)\\|null, Closure\\(PhpParser\\\\Node\\\\Stmt\\\\Class_\\|PhpParser\\\\Node\\\\Stmt\\\\Enum_\\|PhpParser\\\\Node\\\\Stmt\\\\Interface_\\|PhpParser\\\\Node\\\\Stmt\\\\Trait_\\)\\: \\(string\\|null\\) given\\.$#" | ||
count: 1 | ||
path: src/Actions/ResolveClassesInPhpFileAction.php | ||
|
||
- | ||
message: "#^Instanceof between phpDocumentor\\\\Reflection\\\\Type and phpDocumentor\\\\Reflection\\\\Types\\\\ClassString will always evaluate to false\\.$#" | ||
count: 1 | ||
path: src/Actions/TranspileTypeToTypeScriptAction.php | ||
|
||
- | ||
message: "#^If condition is always true\\.$#" | ||
count: 1 | ||
path: src/Attributes/TypeScriptType.php | ||
|
||
- | ||
message: "#^Unreachable statement \\- code above always terminates\\.$#" | ||
count: 1 | ||
path: src/Attributes/TypeScriptType.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$callback of function array_map expects \\(callable\\(ReflectionEnumUnitCase\\)\\: mixed\\)\\|null, Closure\\(ReflectionEnumBackedCase\\)\\: non\\-falsy\\-string given\\.$#" | ||
count: 1 | ||
path: src/Transformers/EnumTransformer.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$callback of function array_map expects \\(callable\\(ReflectionEnumUnitCase\\)\\: mixed\\)\\|null, Closure\\(ReflectionEnumBackedCase\\)\\: string given\\.$#" | ||
count: 1 | ||
path: src/Transformers/EnumTransformer.php | ||
|
||
- | ||
message: "#^Method Spatie\\\\TypeScriptTransformer\\\\TypeReflectors\\\\TypeReflector\\:\\:new\\(\\) should return static\\(Spatie\\\\TypeScriptTransformer\\\\TypeReflectors\\\\TypeReflector\\) but returns Spatie\\\\TypeScriptTransformer\\\\TypeReflectors\\\\MethodParameterTypeReflector\\.$#" | ||
count: 1 | ||
path: src/TypeReflectors/TypeReflector.php | ||
|
||
- | ||
message: "#^Method Spatie\\\\TypeScriptTransformer\\\\TypeReflectors\\\\TypeReflector\\:\\:new\\(\\) should return static\\(Spatie\\\\TypeScriptTransformer\\\\TypeReflectors\\\\TypeReflector\\) but returns Spatie\\\\TypeScriptTransformer\\\\TypeReflectors\\\\MethodReturnTypeReflector\\.$#" | ||
count: 1 | ||
path: src/TypeReflectors/TypeReflector.php | ||
|
||
- | ||
message: "#^Method Spatie\\\\TypeScriptTransformer\\\\TypeReflectors\\\\TypeReflector\\:\\:new\\(\\) should return static\\(Spatie\\\\TypeScriptTransformer\\\\TypeReflectors\\\\TypeReflector\\) but returns Spatie\\\\TypeScriptTransformer\\\\TypeReflectors\\\\PropertyTypeReflector\\.$#" | ||
count: 1 | ||
path: src/TypeReflectors/TypeReflector.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
parameters: | ||
level: 5 | ||
paths: | ||
- src | ||
tmpDir: build/phpstan | ||
reportUnmatchedIgnoredErrors: true | ||
checkMissingIterableValueType: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters