| 1 | <?php |
||
| 7 | abstract class AbstractAnnotationReadable extends AbstractParentCore |
||
| 8 | { |
||
| 9 | use OptionsTrait; |
||
| 10 | |||
| 11 | private $children; |
||
| 12 | |||
| 13 | protected function getChildren() |
||
| 14 | { |
||
| 15 | if (null === $this->children) { |
||
| 16 | $this->children = $this->options['reader']->read($this->options['class'], ChildCoreInterface::class); |
||
| 17 | uasort($this->children, function (ChildCoreInterface $core, ChildCoreInterface $core2) { |
||
| 18 | return $core->getSequence() > $core2->getSequence(); |
||
| 19 | }); |
||
| 20 | } |
||
| 21 | |||
| 22 | return $this->children; |
||
| 23 | } |
||
| 24 | |||
| 25 | protected function initResult() |
||
| 29 | |||
| 30 | private function moveToNextLine() |
||
| 36 | } |
||
| 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.