@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @link https://github.com/nnx-framework/doctrine |
|
| 4 | - * @author Malofeykin Andrey <[email protected]> |
|
| 5 | - */ |
|
| 3 | + * @link https://github.com/nnx-framework/doctrine |
|
| 4 | + * @author Malofeykin Andrey <[email protected]> |
|
| 5 | + */ |
|
| 6 | 6 | namespace Nnx\Doctrine; |
| 7 | 7 | |
| 8 | 8 | use Nnx\Doctrine\ObjectManager\DoctrineObjectManager; |
@@ -74,12 +74,12 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | $listEntityInterfaces = $this->buildListEntityInterfaces($entityClassNames); |
| 76 | 76 | |
| 77 | - $map = []; |
|
| 77 | + $map = [ ]; |
|
| 78 | 78 | |
| 79 | 79 | $entityManager = $this->getEntityManager(); |
| 80 | 80 | foreach ($listEntityInterfaces as $currentInterface) { |
| 81 | 81 | if ($entityManager->hasEntityClassByInterface($currentInterface)) { |
| 82 | - $map[$currentInterface] = $entityManager->get($currentInterface); |
|
| 82 | + $map[ $currentInterface ] = $entityManager->get($currentInterface); |
|
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | |
@@ -93,9 +93,9 @@ discard block |
||
| 93 | 93 | * |
| 94 | 94 | * @return array |
| 95 | 95 | */ |
| 96 | - public function buildListEntityInterfaces(array $entityClassNames = []) |
|
| 96 | + public function buildListEntityInterfaces(array $entityClassNames = [ ]) |
|
| 97 | 97 | { |
| 98 | - $listEntityInterfaces = []; |
|
| 98 | + $listEntityInterfaces = [ ]; |
|
| 99 | 99 | |
| 100 | 100 | $moduleOptionsManager = $this->getModuleOptionsPluginManager(); |
| 101 | 101 | $allowedModules = $this->getAllowedModules($entityClassNames); |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | if ($moduleOptionsManager->hasModuleNameByClassName($currentInterface)) { |
| 108 | 108 | $moduleNameByInterface = $moduleOptionsManager->getModuleNameByClassName($currentInterface); |
| 109 | 109 | if (array_key_exists($moduleNameByInterface, $allowedModules)) { |
| 110 | - $listEntityInterfaces[$currentInterface] = $currentInterface; |
|
| 110 | + $listEntityInterfaces[ $currentInterface ] = $currentInterface; |
|
| 111 | 111 | } |
| 112 | 112 | } |
| 113 | 113 | } |
@@ -123,14 +123,14 @@ discard block |
||
| 123 | 123 | * |
| 124 | 124 | * @return array |
| 125 | 125 | */ |
| 126 | - public function getAllowedModules(array $entityClassNames = []) |
|
| 126 | + public function getAllowedModules(array $entityClassNames = [ ]) |
|
| 127 | 127 | { |
| 128 | 128 | $moduleOptionsManager = $this->getModuleOptionsPluginManager(); |
| 129 | - $allowedModules = []; |
|
| 129 | + $allowedModules = [ ]; |
|
| 130 | 130 | foreach ($entityClassNames as $entityClassName) { |
| 131 | 131 | if ($moduleOptionsManager->hasModuleNameByClassName($entityClassName)) { |
| 132 | 132 | $moduleName = $moduleOptionsManager->getModuleNameByClassName($entityClassName); |
| 133 | - $allowedModules[$moduleName] = $moduleName; |
|
| 133 | + $allowedModules[ $moduleName ] = $moduleName; |
|
| 134 | 134 | } |
| 135 | 135 | } |
| 136 | 136 | |
@@ -154,11 +154,11 @@ discard block |
||
| 154 | 154 | |
| 155 | 155 | $allMetadata = $objectManager->getMetadataFactory()->getAllMetadata(); |
| 156 | 156 | |
| 157 | - $entityClassNames = []; |
|
| 157 | + $entityClassNames = [ ]; |
|
| 158 | 158 | foreach ($allMetadata as $classMetadata) { |
| 159 | 159 | if ($classMetadata instanceof ClassMetadata) { |
| 160 | 160 | $entityClassName = $classMetadata->getName(); |
| 161 | - $entityClassNames[$entityClassName] = $entityClassName; |
|
| 161 | + $entityClassNames[ $entityClassName ] = $entityClassName; |
|
| 162 | 162 | } |
| 163 | 163 | } |
| 164 | 164 | |