1 | <?php |
||
14 | class ClassPattern implements PatternInterface { |
||
15 | |||
16 | /** |
||
17 | * Result of this pattern will be body of the class |
||
18 | */ |
||
19 | const OUTPUT_BODY = 1; |
||
20 | |||
21 | /** |
||
22 | * Result of this pattern will be full class |
||
23 | */ |
||
24 | const OUTPUT_FULL = 2; |
||
25 | |||
26 | |||
27 | /** |
||
28 | * @var QueryStrategy |
||
29 | */ |
||
30 | private $nameQuery = null; |
||
31 | |||
32 | /** |
||
33 | * @var int |
||
34 | */ |
||
35 | private $outputType = self::OUTPUT_BODY; |
||
36 | |||
37 | |||
38 | /** |
||
39 | * By default we search for classes with any name |
||
40 | */ |
||
41 | 39 | public function __construct() { |
|
44 | |||
45 | |||
46 | /** |
||
47 | * @codeCoverageIgnore |
||
48 | * @deprecated |
||
49 | * @param string $name |
||
50 | * @return $this |
||
51 | */ |
||
52 | public function nameIs($name) { |
||
56 | |||
57 | |||
58 | /** |
||
59 | * @param QueryStrategy|string $name |
||
60 | * @return $this |
||
61 | */ |
||
62 | 12 | public function withName($name) { |
|
73 | |||
74 | |||
75 | /** |
||
76 | * @return $this |
||
77 | */ |
||
78 | public function outputBody() { |
||
82 | |||
83 | |||
84 | /** |
||
85 | * @return $this |
||
86 | */ |
||
87 | 6 | public function outputFull() { |
|
91 | |||
92 | |||
93 | /** |
||
94 | * @codeCoverageIgnore |
||
95 | * @deprecated |
||
96 | * @param QueryStrategy $strategy |
||
97 | * @return $this |
||
98 | */ |
||
99 | public function whereName(QueryStrategy $strategy) { |
||
103 | |||
104 | |||
105 | /** |
||
106 | * @inheritdoc |
||
107 | */ |
||
108 | 36 | public function __invoke(QuerySequence $querySequence) { |
|
143 | |||
144 | } |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: