Skip to content

Commit

Permalink
Merge pull request #13 from worksome/JIRA-4847_Larastan-strict-rules
Browse files Browse the repository at this point in the history
feat: Larastan strict rules
  • Loading branch information
odinns authored Apr 29, 2022
2 parents 544ac79 + 4f5586a commit a19ab26
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 7 deletions.
16 changes: 9 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@
"require": {
"PHP": "^8.0",
"composer-plugin-api": "^2.0",
"worksome/code-sniffer": "^0.8.0",
"nunomaduro/larastan": "^1.0 || ^2.0",
"rector/rector": "^0.12.0",
"canvural/larastan-strict-rules": "^1.0",
"friendsofphp/php-cs-fixer": "^3.8",
"jetbrains/phpstorm-attributes": "^1.0",
"nunomaduro/larastan": "^1.0 || ^2.0",
"phpstan/phpstan-mockery": "^1.0",
"friendsofphp/php-cs-fixer": "^3.8"
"rector/rector": "^0.12.0",
"worksome/code-sniffer": "^0.8.0"
},
"require-dev": {
"composer/composer": "^2.0",
"pestphp/pest": "^1.21",
"spatie/ray": "^1.32",
"spatie/invade": "^1.0"
"spatie/invade": "^1.0",
"spatie/ray": "^1.32"
},
"autoload": {
"psr-4": {
Expand All @@ -42,6 +43,7 @@
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"pestphp/pest-plugin": true
}
},
"sort-packages": true
}
}
35 changes: 35 additions & 0 deletions larastan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,38 @@ rules:
services:
-
class: Worksome\CodingStyle\PHPStan\Laravel\DisallowPartialRouteResource\PartialRouteResourceInspector
-
class: Vural\LarastanStrictRules\Rules\NoDynamicWhereRule
tags:
- phpstan.rules.rule
-
class: Vural\LarastanStrictRules\Rules\NoValidationInControllerRule
tags:
- phpstan.rules.rule
-
class: Vural\LarastanStrictRules\Rules\ScopeShouldReturnQueryBuilderRule
tags:
- phpstan.rules.rule
-
class: Vural\LarastanStrictRules\Rules\NoPropertyAccessorRule
tags:
- phpstan.rules.rule
# -
# class: Vural\LarastanStrictRules\Rules\NoGlobalLaravelFunctionRule
# arguments:
# allowedFunctions:
# - collect
# - data_get
# - now
# - optional
# - tap
# - throw_if
# - throw_unless
# - value
# - with
# tags:
# - phpstan.rules.rule
# -
# class: Vural\LarastanStrictRules\Rules\NoLocalQueryScopeRule
# tags:
# - phpstan.rules.rule

0 comments on commit a19ab26

Please sign in to comment.