Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Dec 12, 2024
1 parent a8d3fcf commit 00ef1cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"rector/rector-src": "dev-main",
"rector/type-perfect": "^2.0",
"symplify/easy-coding-standard": "^12.5",
"symplify/phpstan-rules": "^14.0",
"symplify/vendor-patches": "^11.3",
"tomasvotruba/class-leak": "^2.0",
"tracy/tracy": "^2.10"
Expand Down
13 changes: 4 additions & 9 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# to be enabled later
# includes:
# - vendor/symplify/phpstan-rules/config/symplify-rules.neon
includes:
- vendor/symplify/phpstan-rules/config/symplify-rules.neon

parameters:
level: 8
Expand Down Expand Up @@ -38,11 +38,6 @@ parameters:
paths:
- tests/Set/*/config/configured_set.php

# debug functions
# -
# message: '#Function "(d|function_exists)\(\)" cannot be used/left in the code#'
# path: tests/debug_functions.php

# false positive
-
message: '#PHPDoc tag @return contains unresolvable type#'
Expand All @@ -55,5 +50,5 @@ parameters:
- '#::provideMinPhpVersion\(\) never returns \d+ so it can be removed from the return type#'
- '#Method Rector\\Doctrine\\CodeQuality\\AttributeTransformer\\ClassAttributeTransformer\\.*ClassAttributeTransformer\:\:getClassName\(\) never returns#'

-
identifier: notIdentical.alwaysTrue
# debug function
- '#Function "d\(\)" cannot be used/left in the code#'
2 changes: 1 addition & 1 deletion src/NodeAnalyzer/AttributeFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function hasAttributeByClasses(
ClassMethod | Property | ClassLike | Param $node,
array $attributeClasses
): bool {
return $this->findAttributeByClasses($node, $attributeClasses) !== [];
return $this->findAttributeByClasses($node, $attributeClasses) instanceof Attribute;
}

private function findArgByName(Attribute $attribute, string $argName): Expr|null
Expand Down

0 comments on commit 00ef1cd

Please sign in to comment.