Skip to content

Commit e04dc50

Browse files
cnt
1 parent 8801915 commit e04dc50

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

src/Reflection/ExtendedMethodReflection.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,10 @@ public function isPure(): TrinaryLogic;
6565
*/
6666
public function getAttributes(): array;
6767

68+
/**
69+
* Has the #[\NoDiscard] attribute - on PHP 8.5+ if the function's return
70+
* value is unused at runtime a warning is emitted, phpstan will emit the
71+
* warning during analysis and on older PHP versions too
72+
*/
73+
public function hasNoDiscardAttribute(): TrinaryLogic;
6874
}

src/Reflection/MethodReflection.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,4 @@ public function getThrowType(): ?Type;
3030

3131
public function hasSideEffects(): TrinaryLogic;
3232

33-
/**
34-
* Has the #[\NoDiscard] attribute - on PHP 8.5+ if the function's return
35-
* value is unused at runtime a warning is emitted, phpstan will emit the
36-
* warning during analysis and on older PHP versions too
37-
*/
38-
public function hasNoDiscardAttribute(): TrinaryLogic;
39-
4033
}

src/Reflection/ResolvedMethodReflection.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,4 +229,9 @@ public function getAttributes(): array
229229
return $this->reflection->getAttributes();
230230
}
231231

232+
public function hasNoDiscardAttribute(): TrinaryLogic
233+
{
234+
return $this->reflection->hasNoDiscardAttribute();
235+
}
236+
232237
}

0 commit comments

Comments
 (0)