Completed
Push — master ( bf86fc...9c27b7 )
by Андрей
05:25 queued 03:00
created
src/ObjectManager/ObjectManagerAutoDetector.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   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      *
27 27
      * @var array
28 28
      */
29
-    protected $classNameToObjectManagerName = [];
29
+    protected $classNameToObjectManagerName = [ ];
30 30
 
31 31
     /**
32 32
      * ObjectManagerAutoDetector constructor.
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             throw new Exception\ErrorBuildObjectManagerNameException($errMsg);
55 55
         }
56 56
 
57
-        return $this->classNameToObjectManagerName[$className];
57
+        return $this->classNameToObjectManagerName[ $className ];
58 58
     }
59 59
 
60 60
 
@@ -69,31 +69,31 @@  discard block
 block discarded – undo
69 69
     public function hasObjectManagerNameByClassName($className)
70 70
     {
71 71
         if (array_key_exists($className, $this->classNameToObjectManagerName)) {
72
-            return false !== $this->classNameToObjectManagerName[$className];
72
+            return false !== $this->classNameToObjectManagerName[ $className ];
73 73
         }
74 74
 
75
-        $moduleOptionsManager =  $this->getModuleOptionsManager();
75
+        $moduleOptionsManager = $this->getModuleOptionsManager();
76 76
         if (!$moduleOptionsManager->hasOptionsByClassName($className)) {
77
-            $this->classNameToObjectManagerName[$className] = false;
77
+            $this->classNameToObjectManagerName[ $className ] = false;
78 78
             return false;
79 79
         }
80 80
 
81 81
         $moduleOptions = $moduleOptionsManager->getOptionsByClassName($className);
82 82
 
83 83
         if (!$moduleOptions instanceof ObjectManagerNameProviderInterface) {
84
-            $this->classNameToObjectManagerName[$className] = false;
84
+            $this->classNameToObjectManagerName[ $className ] = false;
85 85
             return false;
86 86
         }
87 87
 
88 88
         $objectManagerName = $moduleOptions->getObjectManagerName();
89 89
 
90 90
         if (!is_string($objectManagerName)) {
91
-            $this->classNameToObjectManagerName[$className] = false;
91
+            $this->classNameToObjectManagerName[ $className ] = false;
92 92
             return false;
93 93
         }
94
-        $this->classNameToObjectManagerName[$className] = $objectManagerName;
94
+        $this->classNameToObjectManagerName[ $className ] = $objectManagerName;
95 95
 
96
-        return false !== $this->classNameToObjectManagerName[$className];
96
+        return false !== $this->classNameToObjectManagerName[ $className ];
97 97
     }
98 98
 
99 99
 
Please login to merge, or discard this patch.
src/ObjectManager/OrmAbstractFactory.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/Exception/ExceptionInterface.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/Exception/InvalidArgumentException.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/EntityManager/EntityManagerProviderInterface.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/EntityManager/OrmEntityLocatorInterface.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/EntityManager/EntityManager.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   +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.
src/EntityManager/Exception/InvalidArgumentException.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/EntityManager/OrmEntityAbstractFactory.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   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      *
24 24
      * @var array
25 25
      */
26
-    protected $prototype = [];
26
+    protected $prototype = [ ];
27 27
 
28 28
     /**
29 29
      * @inheritdoc
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     public function canCreateServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
40 40
     {
41 41
         if (array_key_exists($requestedName, $this->prototype)) {
42
-            return false !== $this->prototype[$requestedName];
42
+            return false !== $this->prototype[ $requestedName ];
43 43
         }
44 44
 
45 45
         $appServiceLocator = $serviceLocator;
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
         $hasOrmEntity = $ormEntityLocator->has($requestedName);
54 54
         if (false === $hasOrmEntity) {
55
-            $this->prototype[$requestedName] = false;
55
+            $this->prototype[ $requestedName ] = false;
56 56
         }
57 57
 
58 58
         return $hasOrmEntity;
@@ -75,11 +75,11 @@  discard block
 block discarded – undo
75 75
     public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
76 76
     {
77 77
         if (array_key_exists($requestedName, $this->prototype)) {
78
-            if (!is_object($this->prototype[$requestedName])) {
78
+            if (!is_object($this->prototype[ $requestedName ])) {
79 79
                 $errMsg = sprintf('Invalid prototype for %s', $requestedName);
80 80
                 throw new Exception\RuntimeException($errMsg);
81 81
             }
82
-            return clone $this->prototype[$requestedName];
82
+            return clone $this->prototype[ $requestedName ];
83 83
         }
84 84
 
85 85
         $appServiceLocator = $serviceLocator;
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             $r = new ReflectionClass($entityClassName);
99 99
             $entity = $r->newInstance();
100 100
         }
101
-        $this->prototype[$requestedName] = $entity;
101
+        $this->prototype[ $requestedName ] = $entity;
102 102
 
103 103
 
104 104
         return $entity;
Please login to merge, or discard this patch.