| Conditions | 5 |
| Paths | 6 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 13 | public function extractBest(): ?Node |
|
| 24 | { |
||
| 25 | 13 | $bestNode = null; |
|
| 26 | |||
| 27 | 13 | foreach ($this->nodes as $node) { |
|
| 28 | 13 | if ($bestNode === null || $node->getF() < $bestNode->getF()) { |
|
|
|
|||
| 29 | 13 | $bestNode = $node; |
|
| 30 | } |
||
| 31 | } |
||
| 32 | |||
| 33 | 13 | if ($bestNode !== null) { |
|
| 34 | 13 | $this->remove($bestNode); |
|
| 35 | } |
||
| 36 | |||
| 37 | 13 | return $bestNode; |
|
| 38 | } |
||
| 73 |
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.