Skip to content

Commit

Permalink
Enable shipmonk phpstan rules
Browse files Browse the repository at this point in the history
  • Loading branch information
xificurk committed Jun 26, 2022
1 parent bf24eb0 commit a8a0762
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@
},
"require-dev": {
"nette/tester": "2.4.2",
"phpstan/phpstan": "1.7.7",
"phpstan/phpstan-strict-rules": "1.2.3",
"phpstan/phpstan": "1.7.15",
"phpstan/phpstan-strict-rules": "1.3.0",
"nepada/phpstan-nette-tester": "0.4.0",
"spaze/phpstan-disallowed-calls": "2.4.0",
"shipmonk/phpstan-rules": "1.0.1",
"php-parallel-lint/php-parallel-lint": "1.3.2",
"nepada/coding-standard": "7.4.3"
},
Expand Down
1 change: 1 addition & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ includes:
- vendor/spaze/phpstan-disallowed-calls/disallowed-insecure-calls.neon
- vendor/spaze/phpstan-disallowed-calls/disallowed-loose-calls.neon
- tests/PHPStan/disallowedCalls.neon
- tests/PHPStan/shipmonk.neon
- tests/PHPStan/conditional.config.php

parameters:
Expand Down
1 change: 1 addition & 0 deletions phpstan.tests.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ includes:
- vendor/spaze/phpstan-disallowed-calls/disallowed-insecure-calls.neon
- vendor/spaze/phpstan-disallowed-calls/disallowed-loose-calls.neon
- tests/PHPStan/disallowedCalls.neon
- tests/PHPStan/shipmonk.neon
- tests/PHPStan/conditional.config.tests.php

parameters:
Expand Down
14 changes: 14 additions & 0 deletions tests/PHPStan/shipmonk.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
rules:
- ShipMonk\PHPStan\Rule\ForbidFetchOnMixedRule
- ShipMonk\PHPStan\Rule\ForbidMatchDefaultArmForEnumsRule
- ShipMonk\PHPStan\Rule\ForbidMethodCallOnMixedRule
- ShipMonk\PHPStan\Rule\ForbidReturnInConstructorRule
- ShipMonk\PHPStan\Rule\ForbidUnsetClassFieldRule
- ShipMonk\PHPStan\Rule\ForbidUnusedExceptionRule
- ShipMonk\PHPStan\Rule\RequirePreviousExceptionPassRule

services:
-
type: ShipMonk\PHPStan\Visitor\UnusedExceptionVisitor
tags:
- phpstan.parser.richParserNodeVisitor

0 comments on commit a8a0762

Please sign in to comment.