Completed
Push — dev ( 47faa5...5ca5e9 )
by Андрей
03:08
created
src/DiscriminatorEntry/DiscriminatorEntryListener.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -43,14 +43,14 @@  discard block
 block discarded – undo
43 43
      *
44 44
      * @var array
45 45
      */
46
-    protected $entityManagerAllClassNames = [];
46
+    protected $entityManagerAllClassNames = [ ];
47 47
 
48 48
     /**
49 49
      * Ключем является имя класса, а значением discriminatorValue, взятое из методанных
50 50
      *
51 51
      * @var array
52 52
      */
53
-    protected $discriminatorValueMap = [];
53
+    protected $discriminatorValueMap = [ ];
54 54
 
55 55
     /**
56 56
      * DiscriminatorEntryListener constructor.
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     protected function init()
87 87
     {
88 88
         try {
89
-            AnnotationRegistry::registerLoader(function ($class) {
89
+            AnnotationRegistry::registerLoader(function($class) {
90 90
                 return (bool) class_exists($class);
91 91
             });
92 92
         } catch (\Exception $e) {
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             $rootEntityMetadata = $eventArgs->getEntityManager()->getClassMetadata($classMetadata->rootEntityName);
124 124
 
125 125
             if (array_key_exists($discriminatorValue, $rootEntityMetadata->discriminatorMap)) {
126
-                $errMsg = sprintf('Found duplicate discriminator map entry \'%s\' in %s', $discriminatorValue,  $classMetadata->name);
126
+                $errMsg = sprintf('Found duplicate discriminator map entry \'%s\' in %s', $discriminatorValue, $classMetadata->name);
127 127
                 throw new Exception\DuplicateDiscriminatorMapEntryException($errMsg);
128 128
             }
129 129
 
@@ -139,11 +139,11 @@  discard block
 block discarded – undo
139 139
     public function hasDiscriminatorValue($className)
140 140
     {
141 141
         if (array_key_exists($className, $this->discriminatorValueMap)) {
142
-            return false !== $this->discriminatorValueMap[$className];
142
+            return false !== $this->discriminatorValueMap[ $className ];
143 143
         }
144
-        $this->discriminatorValueMap[$className] = $this->buildDiscriminatorValueMap($className);
144
+        $this->discriminatorValueMap[ $className ] = $this->buildDiscriminatorValueMap($className);
145 145
 
146
-        return $this->discriminatorValueMap[$className];
146
+        return $this->discriminatorValueMap[ $className ];
147 147
     }
148 148
 
149 149
     /**
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
             throw new Exception\DiscriminatorValueNotFoundException($errMsg);
163 163
         }
164 164
 
165
-        return $this->discriminatorValueMap[$className];
165
+        return $this->discriminatorValueMap[ $className ];
166 166
     }
167 167
 
168 168
     /**
Please login to merge, or discard this patch.