Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

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 635674d commit 9f9ad52
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
5 changes: 3 additions & 2 deletions composer.json
Expand Up @@ -23,10 +23,11 @@
"nepada/coding-standard": "7.4.3",
"nepada/phpstan-nette-tester": "0.4.0",
"nette/tester": "2.4.2",
"phpstan/phpstan": "1.7.8",
"phpstan/phpstan": "1.7.15",
"phpstan/phpstan-nette": "1.0.0",
"phpstan/phpstan-strict-rules": "1.2.3",
"phpstan/phpstan-strict-rules": "1.3.0",
"spaze/phpstan-disallowed-calls": "2.4.0",
"shipmonk/phpstan-rules": "1.0.1",
"nette/di": "^3.0.6@dev",
"nette/schema": "^1.0.3@dev",
"nette/bootstrap": ">=3.0@dev"
Expand Down
1 change: 1 addition & 0 deletions phpstan.neon.dist
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
Expand Up @@ -9,6 +9,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
@@ -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 9f9ad52

Please sign in to comment.