Optimized FormMeta and Tests

This commit is contained in:
Kevin Frantz
2018-11-23 16:50:37 +01:00
parent 2009f1b691
commit 926eb0c3fb
6 changed files with 59 additions and 9 deletions

View File

@@ -13,6 +13,8 @@ use App\Domain\FormManagement\FormMeta;
*/
class SourceMeta implements SourceMetaInterface
{
const FOLDER = 'entity';
/**
* @var \ReflectionClass
*/
@@ -55,10 +57,15 @@ class SourceMeta implements SourceMetaInterface
$this->setBasicPathArray();
$this->setBasicName();
$this->setInterfaceReflection();
$this->templateMeta = new TemplateMeta($this->basicPathArray, $this->basicName, 'entity');
$this->setTemplateMeta();
$this->formMeta = new FormMeta($this);
}
private function setTemplateMeta(): void
{
$this->templateMeta = new TemplateMeta($this->basicPathArray, $this->basicName, self::FOLDER);
}
private function setBasicPathArray(): void
{
$namespace = $this->sourceReflection->getNamespaceName();