Completed
Push — dev ( e28961...6d17d3 )
by Андрей
18:51
created
src/EntityManager/OrmEntityLocatorFactory.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Utils/Exception/RuntimeException.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/ObjectManager/Exception/RuntimeException.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Controller/EntityMapBuilderControllerFactory.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
config/controllers.config.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/ObjectManager/DoctrineObjectManagerInterface.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Utils/EntityMapBuilderInterface.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Utils/EntityMapBuilder.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -77,12 +77,12 @@  discard block
 block discarded – undo
77 77
 
78 78
         $listEntityInterfaces = $this->buildListEntityInterfaces($entityClassNames);
79 79
 
80
-        $map = [];
80
+        $map = [ ];
81 81
 
82 82
         $entityManager = $this->getEntityManager();
83 83
         foreach ($listEntityInterfaces as $currentInterface) {
84 84
             if ($entityManager->hasEntityClassByInterface($currentInterface)) {
85
-                $map[$currentInterface] = $entityManager->getEntityClassByInterface($currentInterface);
85
+                $map[ $currentInterface ] = $entityManager->getEntityClassByInterface($currentInterface);
86 86
             }
87 87
         }
88 88
 
@@ -96,9 +96,9 @@  discard block
 block discarded – undo
96 96
      *
97 97
      * @return array
98 98
      */
99
-    public function buildListEntityInterfaces(array $entityClassNames = [])
99
+    public function buildListEntityInterfaces(array $entityClassNames = [ ])
100 100
     {
101
-        $listEntityInterfaces = [];
101
+        $listEntityInterfaces = [ ];
102 102
 
103 103
         $moduleOptionsManager = $this->getModuleOptionsPluginManager();
104 104
         $allowedModules = $this->getAllowedModules($entityClassNames);
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
                 if ($moduleOptionsManager->hasModuleNameByClassName($currentInterface)) {
111 111
                     $moduleNameByInterface = $moduleOptionsManager->getModuleNameByClassName($currentInterface);
112 112
                     if (array_key_exists($moduleNameByInterface, $allowedModules)) {
113
-                        $listEntityInterfaces[$currentInterface] = $currentInterface;
113
+                        $listEntityInterfaces[ $currentInterface ] = $currentInterface;
114 114
                     }
115 115
                 }
116 116
             }
@@ -126,14 +126,14 @@  discard block
 block discarded – undo
126 126
      *
127 127
      * @return array
128 128
      */
129
-    public function getAllowedModules(array $entityClassNames = [])
129
+    public function getAllowedModules(array $entityClassNames = [ ])
130 130
     {
131 131
         $moduleOptionsManager = $this->getModuleOptionsPluginManager();
132
-        $allowedModules = [];
132
+        $allowedModules = [ ];
133 133
         foreach ($entityClassNames as $entityClassName) {
134 134
             if ($moduleOptionsManager->hasModuleNameByClassName($entityClassName)) {
135 135
                 $moduleName = $moduleOptionsManager->getModuleNameByClassName($entityClassName);
136
-                $allowedModules[$moduleName] = $moduleName;
136
+                $allowedModules[ $moduleName ] = $moduleName;
137 137
             }
138 138
         }
139 139
 
@@ -157,11 +157,11 @@  discard block
 block discarded – undo
157 157
 
158 158
         $allMetadata = $objectManager->getMetadataFactory()->getAllMetadata();
159 159
 
160
-        $entityClassNames = [];
160
+        $entityClassNames = [ ];
161 161
         foreach ($allMetadata as $classMetadata) {
162 162
             if ($classMetadata instanceof ClassMetadata) {
163 163
                 $entityClassName = $classMetadata->getName();
164
-                $entityClassNames[$entityClassName] = $entityClassName;
164
+                $entityClassNames[ $entityClassName ] = $entityClassName;
165 165
             }
166 166
         }
167 167
 
Please login to merge, or discard this patch.
src/EntityManager/EntityManager.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      *
29 29
      * @var array
30 30
      */
31
-    protected $interfaceNameToEntityClass = [];
31
+    protected $interfaceNameToEntityClass = [ ];
32 32
 
33 33
     /**
34 34
      * EntityManager constructor.
@@ -72,11 +72,11 @@  discard block
 block discarded – undo
72 72
     public function getEntityClassByInterface($interfaceName)
73 73
     {
74 74
         if ($this->hasEntityClassByInterface($interfaceName)) {
75
-            $errMsg = sprintf('Error build entity class name for %s', $interfaceName) ;
75
+            $errMsg = sprintf('Error build entity class name for %s', $interfaceName);
76 76
             throw new Exception\ErrorBuildEntityClassNameException($errMsg);
77 77
         }
78 78
 
79
-        return $this->interfaceNameToEntityClass[$interfaceName];
79
+        return $this->interfaceNameToEntityClass[ $interfaceName ];
80 80
     }
81 81
 
82 82
     /**
@@ -93,22 +93,22 @@  discard block
 block discarded – undo
93 93
     public function hasEntityClassByInterface($interfaceName)
94 94
     {
95 95
         if (array_key_exists($interfaceName, $this->interfaceNameToEntityClass)) {
96
-            return false !== $this->interfaceNameToEntityClass[$interfaceName];
96
+            return false !== $this->interfaceNameToEntityClass[ $interfaceName ];
97 97
         }
98 98
 
99 99
         if (!$this->has($interfaceName)) {
100
-            $this->interfaceNameToEntityClass[$interfaceName] = false;
100
+            $this->interfaceNameToEntityClass[ $interfaceName ] = false;
101 101
             return false;
102 102
         }
103 103
 
104 104
         $entity = $this->get($interfaceName);
105 105
 
106 106
         if (!is_object($entity)) {
107
-            $this->interfaceNameToEntityClass[$interfaceName] = false;
107
+            $this->interfaceNameToEntityClass[ $interfaceName ] = false;
108 108
             return false;
109 109
         }
110 110
 
111
-        $this->interfaceNameToEntityClass[$interfaceName] = get_class($entity);
111
+        $this->interfaceNameToEntityClass[ $interfaceName ] = get_class($entity);
112 112
 
113 113
         return true;
114 114
     }
Please login to merge, or discard this patch.