| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | protected function getCores() |
||
| 14 | { |
||
| 15 | if (null === $this->cores) { |
||
| 16 | $this->cores = $this->options['reader']->read($this->options['class'], ChildCoreInterface::class); |
||
| 17 | uasort($this->cores, function (ChildCoreInterface $core, ChildCoreInterface $core2) { |
||
| 18 | return $core->getSequence() > $core2->getSequence(); |
||
| 19 | }); |
||
| 20 | } |
||
| 21 | |||
| 22 | return $this->cores; |
||
| 23 | } |
||
| 24 | |||
| 37 |
Overwriting private methods is generally fine as long as you also use private visibility. It might still be preferable for understandability to use a different method name.