| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | 6 | public function fix(NodeSearch $nodeSearch): bool |
|
| 18 | { |
||
| 19 | 6 | $found = false; |
|
| 20 | 6 | foreach ($nodeSearch->eachType(Node\Param::class) as $node) { |
|
| 21 | 6 | if (!in_array($node->type, $this->php7OnlyTypeHints)) { |
|
| 22 | 4 | continue; |
|
| 23 | } |
||
| 24 | |||
| 25 | 5 | $found = true; |
|
| 26 | 5 | $node->type = null; |
|
| 27 | } |
||
| 28 | |||
| 29 | 6 | return $found; |
|
| 30 | } |
||
| 31 | } |
||
| 32 |