1 | <?php |
||||||
2 | |||||||
3 | |||||||
4 | namespace AntidotTest\Container; |
||||||
5 | |||||||
6 | class SomeTestClass |
||||||
7 | { |
||||||
8 | private $stack; |
||||||
9 | private $queue; |
||||||
10 | /** |
||||||
11 | * @var \SplObjectStorage |
||||||
12 | */ |
||||||
13 | private $storage; |
||||||
14 | |||||||
15 | public function __construct( |
||||||
16 | \SplStack $stack, |
||||||
17 | \SplQueue $queue, |
||||||
18 | \SplObjectStorage $storage, |
||||||
19 | array $foo = [], |
||||||
0 ignored issues
–
show
|
|||||||
20 | string $bar = 'foo', |
||||||
0 ignored issues
–
show
The parameter
$bar is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||||
21 | array $bazz = [] |
||||||
0 ignored issues
–
show
The parameter
$bazz is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||||
22 | ) { |
||||||
23 | $this->stack = $stack; |
||||||
24 | $this->queue = $queue; |
||||||
25 | $this->storage = $storage; |
||||||
26 | } |
||||||
27 | |||||||
28 | public function __invoke(): void |
||||||
29 | { |
||||||
30 | $this->stack->toArray(); |
||||||
0 ignored issues
–
show
The method
toArray() does not exist on SplStack .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||||||
31 | $this->queue->count(); |
||||||
32 | } |
||||||
33 | |||||||
34 | public function getQueue(): \SplQueue |
||||||
35 | { |
||||||
36 | return $this->queue; |
||||||
37 | } |
||||||
38 | |||||||
39 | public function getStack(): \SplStack |
||||||
40 | { |
||||||
41 | return $this->stack; |
||||||
42 | } |
||||||
43 | } |
||||||
44 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.