for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace KunicMarko\SonataAnnotationBundle\Reader;
use KunicMarko\SonataAnnotationBundle\Annotation\AddChild;
/**
* @author Marko Kunic <[email protected]>
*/
final class AddChildReader
{
use AnnotationReaderTrait;
public function getChildren(\ReflectionClass $class): array
$children = [];
foreach ($this->getClassAnnotations($class) as $annotation) {
if (!$annotation instanceof AddChild) {
continue;
}
$children[$annotation->getClass()] = $annotation->getField();
return $children;