@@ -27,10 +27,10 @@ discard block |
||
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 |
||
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 |
||
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) { |