Completed
Push — master ( 1585d9...6be3f1 )
by max
06:02
created
src/Entity.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     /**
15 15
      * @param array $data
16 16
      */
17
-    public function __construct(array $data = [])
17
+    public function __construct(array $data = [ ])
18 18
     {
19 19
         $this->populate($data);
20 20
     }
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      * @param array $properties
32 32
      * @return array
33 33
      */
34
-    public function extract(array $properties = [])
34
+    public function extract(array $properties = [ ])
35 35
     {
36 36
         $state = get_object_vars($this);
37 37
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      * @param array $array
49 49
      * @return $this
50 50
      */
51
-    public function populate(array $array = [])
51
+    public function populate(array $array = [ ])
52 52
     {
53 53
         $state = get_object_vars($this);
54 54
 
Please login to merge, or discard this patch.
src/ErrorAwareTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
     /**
8 8
      * @var array
9 9
      */
10
-    private $errors = [];
10
+    private $errors = [ ];
11 11
 
12 12
     /**
13 13
      * @param array $errors
Please login to merge, or discard this patch.
src/EntityFactory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,16 +35,16 @@
 block discarded – undo
35 35
      */
36 36
     public function create(array $data)
37 37
     {
38
-        if (!isset($data['data']) && !isset($data['aggregateItems'])) {
38
+        if (!isset($data[ 'data' ]) && !isset($data[ 'aggregateItems' ])) {
39 39
             return new $this->entityClass($data);
40 40
         }
41 41
 
42 42
         $reflector = new \ReflectionClass($this->entityClass);
43 43
 
44
-        $istanceArgs = [$data['data']];
44
+        $istanceArgs = [ $data[ 'data' ] ];
45 45
 
46
-        foreach ($data['aggregateItems'] as $aggregateItem) {
47
-            $istanceArgs[] = $aggregateItem;
46
+        foreach ($data[ 'aggregateItems' ] as $aggregateItem) {
47
+            $istanceArgs[ ] = $aggregateItem;
48 48
         }
49 49
 
50 50
         return $reflector->newInstanceArgs($istanceArgs);
Please login to merge, or discard this patch.
src/Collection.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function getValuesByEntityMethod($entityMethod)
29 29
     {
30
-        $values = [];
30
+        $values = [ ];
31 31
 
32 32
         foreach ($this->getArrayCopy() as $entity) {
33
-            $values[] = $entity->$entityMethod();
33
+            $values[ ] = $entity->$entityMethod();
34 34
         }
35 35
 
36 36
         return $values;
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function getIds()
69 69
     {
70
-        $ids = [];
70
+        $ids = [ ];
71 71
 
72 72
         foreach ($this as $entity) {
73
-            $ids[] = $entity->getId();
73
+            $ids[ ] = $entity->getId();
74 74
         }
75 75
 
76 76
         return $ids;
@@ -83,16 +83,16 @@  discard block
 block discarded – undo
83 83
      */
84 84
     public function getValueByAttribute($attribute, $unique = true)
85 85
     {
86
-        $methodName = 'get' . ucfirst($attribute);
86
+        $methodName = 'get'.ucfirst($attribute);
87 87
 
88 88
         if (!method_exists(reset($this), $methodName)) {
89
-            throw new \RuntimeException("Entity " . get_class(reset($this)) . " does not have a method $methodName");
89
+            throw new \RuntimeException("Entity ".get_class(reset($this))." does not have a method $methodName");
90 90
         }
91 91
 
92
-        $result = [];
92
+        $result = [ ];
93 93
 
94 94
         foreach ($this as $entity) {
95
-            $result[] = $entity->{$methodName}();
95
+            $result[ ] = $entity->{$methodName}();
96 96
         }
97 97
 
98 98
         if ($unique) {
Please login to merge, or discard this patch.