Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
41 | 21 | protected function replaceParameters(string $subject): string |
|
42 | { |
||
43 | 21 | foreach ($this->parameters as $name => $value) { |
|
44 | 21 | $type = null; |
|
45 | |||
46 | 21 | if (is_array($value)) { |
|
47 | 1 | $type = $value['type']; |
|
48 | 1 | $value = $value['value']; |
|
49 | } |
||
50 | |||
51 | 21 | $subject = preg_replace( |
|
52 | 21 | sprintf('/(\{%s\})/', preg_quote($name, '/')), |
|
53 | 21 | $this->replacingStrategies[$type]->replace($value), |
|
|
|||
54 | 21 | $subject |
|
55 | ); |
||
56 | } |
||
57 | |||
58 | 21 | return $subject; |
|
59 | } |
||
61 |
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.