| Conditions | 5 |
| Paths | 6 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 13 | public function extractBest(): ?Node |
|
| 31 | { |
||
| 32 | 13 | $bestNode = null; |
|
| 33 | |||
| 34 | 13 | foreach ($this->nodes as $node) { |
|
| 35 | 13 | if ($bestNode === null || $node->getF() < $bestNode->getF()) { |
|
|
|
|||
| 36 | 13 | $bestNode = $node; |
|
| 37 | } |
||
| 38 | } |
||
| 39 | |||
| 40 | 13 | if ($bestNode !== null) { |
|
| 41 | 13 | $this->remove($bestNode); |
|
| 42 | } |
||
| 43 | |||
| 44 | 13 | return $bestNode; |
|
| 45 | } |
||
| 80 |
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.