Completed
Push — master ( 99ca87...95904e )
by Andrey
23:44
created
src/DoctrineObjectEngine/MetadataBuilder.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
      * Добавляет метаданные для двухсторонних ассоциаций
110 110
      *
111 111
      * @param DataContainer\EntityInterface      $childEntity
112
-     * @param             $childEntityClassName
112
+     * @param             string $childEntityClassName
113 113
      * @param DataContainer\Association $targetAssociation
114 114
      */
115 115
     protected function buildReverseAssociationMetadata(DataContainer\EntityInterface $childEntity, $childEntityClassName, DataContainer\Association $targetAssociation)
Please login to merge, or discard this patch.
src/EventDispatcher/XmlDoctrineObjectConstructorSubscriber.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@
 block discarded – undo
210 210
     /**
211 211
      * Возвращает менеджер для получения контейнера с данными для DoctrineObjectConstructor
212 212
      *
213
-     * @return AbstractPluginManager
213
+     * @return ContainerInterface
214 214
      */
215 215
     public function getDoctrineObjectConstructorDataManager()
216 216
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
         if (!array_key_exists('name', $type)) {
127 127
             return false;
128 128
         }
129
-        $class = $type['name'];
129
+        $class = $type[ 'name' ];
130 130
         if (!class_exists($class)) {
131 131
             return false;
132 132
         }
Please login to merge, or discard this patch.
src/DataContainer/Entity.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,14 +40,14 @@  discard block
 block discarded – undo
40 40
      *
41 41
      * @var Property[]
42 42
      */
43
-    protected $properties = [];
43
+    protected $properties = [ ];
44 44
 
45 45
     /**
46 46
      * Связи с другими сущностями
47 47
      *
48 48
      * @var Association[]
49 49
      */
50
-    protected $associations = [];
50
+    protected $associations = [ ];
51 51
 
52 52
     /**
53 53
      * Родительская сущность
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function addAssociation(Association $association)
115 115
     {
116
-        $this->associations[$association->getName()] = $association;
116
+        $this->associations[ $association->getName() ] = $association;
117 117
 
118 118
         return $this;
119 119
     }
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     {
140 140
         $normalizeName = Inflector::camelize($property->getName());
141 141
 
142
-        $this->properties[$normalizeName] = $property;
142
+        $this->properties[ $normalizeName ] = $property;
143 143
 
144 144
         return $this;
145 145
     }
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
             throw new Exception\InvalidArgumentException($errMsg);
183 183
         }
184 184
 
185
-        return $this->associations[$name];
185
+        return $this->associations[ $name ];
186 186
     }
187 187
 
188 188
     /**
Please login to merge, or discard this patch.
src/DataContainer/Association.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
     public function addEntity(EntityInterface $entity)
78 78
     {
79 79
         $this->index->indexEntity($entity);
80
-        $this->entities[] = $entity;
80
+        $this->entities[ ] = $entity;
81 81
 
82 82
         return $this;
83 83
     }
Please login to merge, or discard this patch.
src/DataContainer/DataContainer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     /**
30 30
      * @var EntityInterface[]
31 31
      */
32
-    protected $entities = [];
32
+    protected $entities = [ ];
33 33
 
34 34
     /**
35 35
      * Хранилище индексов
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     public function addEntity(EntityInterface $entity)
59 59
     {
60 60
         $this->index->indexEntity($entity);
61
-        $this->entities[] = $entity;
61
+        $this->entities[ ] = $entity;
62 62
 
63 63
         return $this;
64 64
     }
Please login to merge, or discard this patch.
src/DataContainer/Index.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      *
18 18
      * @var EntityInterface[]
19 19
      */
20
-    protected $entities = [];
20
+    protected $entities = [ ];
21 21
 
22 22
     /**
23 23
      * Ключем является уровень вложеннесоти контейнера с данными, а значением массив контейнеров, расположенных на данном
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      *
26 26
      * @var array
27 27
      */
28
-    protected $levelToEntities = [];
28
+    protected $levelToEntities = [ ];
29 29
 
30 30
     /**
31 31
      * Строит индекс для сущностей
@@ -38,11 +38,11 @@  discard block
 block discarded – undo
38 38
     {
39 39
         $level = $entity->getLevel();
40 40
         if (!array_key_exists($level, $this->levelToEntities)) {
41
-            $this->levelToEntities[$level] = [];
41
+            $this->levelToEntities[ $level ] = [ ];
42 42
         }
43
-        $this->levelToEntities[$level][] = $entity;
43
+        $this->levelToEntities[ $level ][ ] = $entity;
44 44
 
45
-        $this->entities[$entity->getId()] = $entity;
45
+        $this->entities[ $entity->getId() ] = $entity;
46 46
         return $this;
47 47
     }
48 48
 
@@ -71,6 +71,6 @@  discard block
 block discarded – undo
71 71
             throw new Exception\RuntimeException($errMsg);
72 72
         }
73 73
 
74
-        return $this->entities[$id];
74
+        return $this->entities[ $id ];
75 75
     }
76 76
 }
Please login to merge, or discard this patch.
src/DataContainerBuilder/XmlBuilder/ParserContext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
      */
125 125
     public function setLevel($level)
126 126
     {
127
-        $this->level = (integer)$level;
127
+        $this->level = (integer) $level;
128 128
 
129 129
         return $this;
130 130
     }
Please login to merge, or discard this patch.
src/DataContainerBuilder/XmlBuilder.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      *
45 45
      * @var array
46 46
      */
47
-    protected $itemNodeUuidToCacheData = [];
47
+    protected $itemNodeUuidToCacheData = [ ];
48 48
 
49 49
     /**
50 50
      * Имя атрибута для того что бы связать SimpleXMLElement и контейнер с данными
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         }
87 87
 
88 88
         $uuid = $this->getUuidAttribute($resource);
89
-        return $this->itemNodeUuidToCacheData[$uuid]['dataContainer'];
89
+        return $this->itemNodeUuidToCacheData[ $uuid ][ 'dataContainer' ];
90 90
     }
91 91
 
92 92
     /**
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         }
106 106
 
107 107
         $uuid = $this->getUuidAttribute($resource);
108
-        return $this->itemNodeUuidToCacheData[$uuid]['entity'];
108
+        return $this->itemNodeUuidToCacheData[ $uuid ][ 'entity' ];
109 109
     }
110 110
 
111 111
     /**
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         if ($this->hasUuidAttribute($resource)) {
125 125
             $uuid = $this->getUuidAttribute($resource);
126 126
             if (array_key_exists($uuid, $this->itemNodeUuidToCacheData)) {
127
-                return $this->itemNodeUuidToCacheData[$uuid]['dataContainer'];
127
+                return $this->itemNodeUuidToCacheData[ $uuid ][ 'dataContainer' ];
128 128
             }
129 129
         }
130 130
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
             $currentUuid = $this->getUuidAttribute($itemNode);
192 192
 
193 193
             if (!array_key_exists($currentUuid, $this->itemNodeUuidToCacheData)) {
194
-                $this->itemNodeUuidToCacheData[$currentUuid] = [
194
+                $this->itemNodeUuidToCacheData[ $currentUuid ] = [
195 195
                     'entity' => $entity,
196 196
                     'dataContainer' => $dataContainer
197 197
                 ];
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
                 $dataContainer->addEntity($entity);
215 215
             }
216 216
 
217
-            $existingProperties = [];
217
+            $existingProperties = [ ];
218 218
             foreach ($properties as $property) {
219 219
                 $propertyName = $property->getName();
220 220
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
                     $errMsg = sprintf('Property %s already exists', $propertyName);
223 223
                     throw new Exception\RuntimeException($errMsg);
224 224
                 }
225
-                $existingProperties[$propertyName] = $propertyName;
225
+                $existingProperties[ $propertyName ] = $propertyName;
226 226
 
227 227
                 $childElements = $property->xpath('./*');
228 228
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 
247 247
                     $this->parseItem($newContext);
248 248
                 } else {
249
-                    $propertyValue = (string)$property;
249
+                    $propertyValue = (string) $property;
250 250
                     $property = new DataContainer\Property();
251 251
                     $property
252 252
                         ->setName($propertyName)
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
     {
270 270
         $uuidAttribute = $this->getDefaultUuidAttribute();
271 271
         $attributesItemNode = $itemNode->attributes();
272
-        return isset($attributesItemNode[$uuidAttribute]);
272
+        return isset($attributesItemNode[ $uuidAttribute ]);
273 273
     }
274 274
 
275 275
 
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
         }
290 290
 
291 291
         $uuidAttribute = $this->getDefaultUuidAttribute();
292
-        return (string)$itemNode[$uuidAttribute];
292
+        return (string) $itemNode[ $uuidAttribute ];
293 293
     }
294 294
 
295 295
     /**
Please login to merge, or discard this patch.
src/ObjectConstructor/DoctrineObjectConstructor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      *
47 47
      * @var array
48 48
      */
49
-    protected $finishedDataContainerId = [];
49
+    protected $finishedDataContainerId = [ ];
50 50
 
51 51
     /**
52 52
      * Constructor.
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         if (!array_key_exists($dataContainerId, $this->finishedDataContainerId)) {
107 107
             $doctrineObjectEngine->import($dataContainer, $metadata->name, $objectManager);
108 108
             $objectManager->flush();
109
-            $this->finishedDataContainerId[$dataContainerId] = $dataContainerId;
109
+            $this->finishedDataContainerId[ $dataContainerId ] = $dataContainerId;
110 110
         }
111 111
 
112 112
         $entity = $data->getEntity();
Please login to merge, or discard this patch.