@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $isFileNonExistent = FileManager::migrationNotExists($this->generator, $migrationName); |
72 | 72 | $isAdding = ($this->generator->isMerge === true && empty($this->generator->diffTypes[$attrKey]) === false); |
73 | 73 | |
74 | - if($isFileNonExistent === true) |
|
74 | + if ($isFileNonExistent === true) |
|
75 | 75 | { |
76 | 76 | $this->setContent(); |
77 | 77 | } else if ($isAdding === true) { |
@@ -96,17 +96,17 @@ discard block |
||
96 | 96 | $formRequestEntity = $this->getFormRequestEntity($this->generator->version, $this->className); |
97 | 97 | /** @var BaseFormRequest $formRequest **/ |
98 | 98 | $formRequest = new $formRequestEntity(); |
99 | - if(method_exists($formRequest, ModelsInterface::MODEL_METHOD_RELATIONS)) |
|
99 | + if (method_exists($formRequest, ModelsInterface::MODEL_METHOD_RELATIONS)) |
|
100 | 100 | { |
101 | 101 | $relations = $formRequest->relations(); |
102 | - foreach($relations as $relationEntity) |
|
102 | + foreach ($relations as $relationEntity) |
|
103 | 103 | { |
104 | 104 | $entityFile = $this->generator->formatEntitiesPath() |
105 | 105 | . PhpInterface::SLASH . |
106 | 106 | $this->generator->objectName . |
107 | 107 | ucfirst($relationEntity) . |
108 | 108 | PhpInterface::PHP_EXT; |
109 | - if(file_exists($entityFile)) |
|
109 | + if (file_exists($entityFile)) |
|
110 | 110 | { |
111 | 111 | $this->setPivotContent($relationEntity); |
112 | 112 | |
@@ -117,13 +117,13 @@ discard block |
||
117 | 117 | MigrationsHelper::getTableName($relationEntity) . |
118 | 118 | PhpInterface::UNDERSCORE . ModelsInterface::MIGRATION_TABLE; |
119 | 119 | |
120 | - if(FileManager::migrationNotExists($this->generator, $migrationName)) |
|
120 | + if (FileManager::migrationNotExists($this->generator, $migrationName)) |
|
121 | 121 | { |
122 | 122 | $file = $this->generator->formatMigrationsPath() . $migrationMask |
123 | 123 | . PhpInterface::UNDERSCORE . $migrationName . PhpInterface::PHP_EXT; |
124 | 124 | // if migration file with the same name occasionally exists we do not override it |
125 | 125 | $isCreated = FileManager::createFile($file, $this->sourceCode); |
126 | - if($isCreated) |
|
126 | + if ($isCreated) |
|
127 | 127 | { |
128 | 128 | Console::out($file . PhpInterface::SPACE . Console::CREATED, Console::COLOR_GREEN); |
129 | 129 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | /** |
39 | 39 | * @var string |
40 | 40 | */ |
41 | - protected string $sourceCode = ''; |
|
41 | + protected string $sourceCode = ''; |
|
42 | 42 | |
43 | 43 | /** |
44 | 44 | * @var bool |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $formRequest = new $formRequestEntity(); |
87 | 87 | if (method_exists($formRequest, ModelsInterface::MODEL_METHOD_RELATIONS)) { |
88 | 88 | $this->sourceCode .= PHP_EOL; |
89 | - $relations = $formRequest->relations(); |
|
89 | + $relations = $formRequest->relations(); |
|
90 | 90 | foreach ($relations as $relationEntity) { |
91 | 91 | $ucEntity = MigrationsHelper::getObjectName($relationEntity); |
92 | 92 | // determine if ManyToMany, OneToMany, OneToOne rels |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | /** @var BaseFormRequest $formRequest * */ |
177 | 177 | $formRequest = new $formRequestEntity(); |
178 | 178 | if (method_exists($formRequest, ModelsInterface::MODEL_METHOD_RELATIONS)) { |
179 | - $relations = $formRequest->relations(); |
|
179 | + $relations = $formRequest->relations(); |
|
180 | 180 | $this->sourceCode .= PHP_EOL; // margin top from props |
181 | 181 | foreach ($relations as $relationEntity) { |
182 | 182 | $ucEntity = ucfirst($relationEntity); |