thecodingmachine /
graphql-controllers
| 1 | <?php |
||
| 2 | |||
| 3 | |||
| 4 | namespace TheCodingMachine\GraphQL\Controllers\Fixtures; |
||
| 5 | |||
| 6 | class TestObject |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * @var string |
||
| 10 | */ |
||
| 11 | private $test; |
||
| 12 | /** |
||
| 13 | * @var bool |
||
| 14 | */ |
||
| 15 | private $testBool; |
||
| 16 | |||
| 17 | public function __construct(string $test, bool $testBool = false) |
||
| 18 | { |
||
| 19 | $this->test = $test; |
||
| 20 | $this->testBool = $testBool; |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @return string |
||
| 25 | */ |
||
| 26 | public function getTest(): string |
||
| 27 | { |
||
| 28 | return $this->test; |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return bool |
||
| 33 | */ |
||
| 34 | public function isTestBool(): bool |
||
| 35 | { |
||
| 36 | return $this->testBool; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return ?string |
||
| 41 | */ |
||
| 42 | public function testRight() |
||
| 43 | { |
||
| 44 | return "foo"; |
||
| 45 | } |
||
| 46 | |||
| 47 | public function getSibling(self $foo): self |
||
|
0 ignored issues
–
show
|
|||
| 48 | { |
||
| 49 | return new self('foo'); |
||
| 50 | } |
||
| 51 | } |
||
| 52 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.