Innmind /
Reflection
| 1 | <?php |
||
| 2 | declare(strict_types = 1); |
||
| 3 | |||
| 4 | namespace Fixtures\Innmind\Reflection; |
||
| 5 | |||
| 6 | final class WithConstructor |
||
| 7 | { |
||
| 8 | private $a; |
||
| 9 | private $b; |
||
| 10 | |||
| 11 | 1 | public function __construct($a) |
|
| 12 | { |
||
| 13 | 1 | $this->a = $a; |
|
| 14 | 1 | } |
|
| 15 | |||
| 16 | public function setA($a) |
||
|
0 ignored issues
–
show
|
|||
| 17 | { |
||
| 18 | $this->a = 42; |
||
| 19 | } |
||
| 20 | |||
| 21 | 1 | public function a() |
|
| 22 | { |
||
| 23 | 1 | return $this->a; |
|
| 24 | } |
||
| 25 | |||
| 26 | 1 | public function b() |
|
| 27 | { |
||
| 28 | 1 | return $this->b; |
|
| 29 | } |
||
| 30 | } |
||
| 31 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.