/** * @return bool|null */ private function validateEntities() { $this->io->newLine(); $this->io->text('Validation Starting for all entities'); $metas = $this->em->getMetadataFactory()->getAllMetadata(); /** @var ClassMetadata $meta */ foreach ($metas as $meta) { if ($meta->isMappedSuperclass) { continue; } $reflClass = $meta->getReflectionClass(); if ($reflClass->hasMethod('__toString')) { $this->io->text(sprintf('%s %s -> have __toString function', $this->os->okSign(), $meta->getName())); } else { $this->io->text(sprintf('%s %s -> have not __toString function', $this->os->warningSign(), $meta->getName())); } } }