Skip to content

Commit 68b490b

Browse files
committed
[DeadCode] Skip with assign to call with target has #[NoDiscard] attribute
1 parent 21a2e45 commit 68b490b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rules/Php80/NodeAnalyzer/PhpAttributeAnalyzer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct(
2424
) {
2525
}
2626

27-
public function hasPhpAttribute(Property | ClassLike | ClassMethod | Param | Function_ $node, string $attributeClass): bool
27+
public function hasPhpAttribute(Property | ClassLike | ClassMethod | Function_ | Param $node, string $attributeClass): bool
2828
{
2929
foreach ($node->attrGroups as $attrGroup) {
3030
foreach ($attrGroup->attrs as $attribute) {
@@ -42,7 +42,7 @@ public function hasPhpAttribute(Property | ClassLike | ClassMethod | Param | Fun
4242
/**
4343
* @param string[] $attributeClasses
4444
*/
45-
public function hasPhpAttributes(Property | ClassLike | ClassMethod | Param $node, array $attributeClasses): bool
45+
public function hasPhpAttributes(Property | ClassLike | ClassMethod | Function_ | Param $node, array $attributeClasses): bool
4646
{
4747
foreach ($attributeClasses as $attributeClass) {
4848
if ($this->hasPhpAttribute($node, $attributeClass)) {

0 commit comments

Comments
 (0)