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 d6b41c2 commit a252d70
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@
"require-dev": {
"nette/tester": "2.4.2",
"mockery/mockery": "1.5.0",
"phpstan/phpstan": "1.7.8",
"phpstan/phpstan-strict-rules": "1.2.3",
"phpstan/phpstan": "1.7.15",
"phpstan/phpstan-strict-rules": "1.3.0",
"phpstan/phpstan-nette": "1.0.0",
"phpstan/phpstan-mockery": "1.1.0",
"nepada/phpstan-nette-tester": "0.4.0",
"spaze/phpstan-disallowed-calls": "2.4.0",
"phpstan/phpstan-mockery": "1.1.0",
"shipmonk/phpstan-rules": "1.0.1",
"php-parallel-lint/php-parallel-lint": "1.3.2",
"nepada/coding-standard": "7.4.3",
"nette/di": "^3.0.6@dev",
Expand Down
1 change: 1 addition & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,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

parameters:
level: max
Expand Down
1 change: 1 addition & 0 deletions phpstan.tests.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,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

parameters:
level: max
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 a252d70

Please sign in to comment.