@@ -20,7 +20,7 @@ |
||
20 | 20 | |
21 | 21 | $ret = true; |
22 | 22 | foreach ($props as $ident => $p) { |
23 | - if (!$p || !$p->active()) { |
|
23 | + if (!$p || !$p->active()) { |
|
24 | 24 | continue; |
25 | 25 | } |
26 | 26 | $valid = $p->validate(); |
@@ -92,7 +92,7 @@ |
||
92 | 92 | |
93 | 93 | // Optional StorableInterface dependencies |
94 | 94 | if (isset($data['source'])) { |
95 | - $this->setSource($data['source']); |
|
95 | + $this->setSource($data['source']); |
|
96 | 96 | } |
97 | 97 | if (isset($data['source_factory'])) { |
98 | 98 | $this->setSourceFactory($data['source_factory']); |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | $classname = $this->identToClassname($ident); |
384 | 384 | |
385 | 385 | if (!class_exists($classname) && !interface_exists($classname)) { |
386 | - return [ $ident ]; |
|
386 | + return [$ident]; |
|
387 | 387 | } |
388 | 388 | |
389 | 389 | $classes = array_values(class_parents($classname)); |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | */ |
511 | 511 | private function filenameFromIdent($ident) |
512 | 512 | { |
513 | - $filename = str_replace([ '\\' ], '.', $ident); |
|
513 | + $filename = str_replace(['\\'], '.', $ident); |
|
514 | 514 | $filename .= '.json'; |
515 | 515 | |
516 | 516 | return $filename; |
@@ -175,7 +175,7 @@ |
||
175 | 175 | if ($property instanceof StorablePropertyInterface) { |
176 | 176 | return $property->fieldNames(); |
177 | 177 | } else { |
178 | - return [ $property ]; |
|
178 | + return [$property]; |
|
179 | 179 | } |
180 | 180 | } |
181 | 181 |
@@ -258,7 +258,7 @@ |
||
258 | 258 | */ |
259 | 259 | public function jsonSerialize() |
260 | 260 | { |
261 | - return array_udiff_assoc($this->data(), $this->defaultData(), [ $this, 'diffValues' ]); |
|
261 | + return array_udiff_assoc($this->data(), $this->defaultData(), [$this, 'diffValues']); |
|
262 | 262 | } |
263 | 263 | |
264 | 264 | /** |
@@ -179,7 +179,7 @@ |
||
179 | 179 | )); |
180 | 180 | } |
181 | 181 | |
182 | - if (in_array($mode, [ self::MODE_ASC, self::MODE_DESC ])) { |
|
182 | + if (in_array($mode, [self::MODE_ASC, self::MODE_DESC])) { |
|
183 | 183 | $this->setDirection($mode); |
184 | 184 | } |
185 | 185 |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | { |
142 | 142 | foreach ($data as $key => $val) { |
143 | 143 | $setter = $this->setter($key); |
144 | - if (is_callable([ $this, $setter ])) { |
|
144 | + if (is_callable([$this, $setter])) { |
|
145 | 145 | $this->{$setter}($val); |
146 | 146 | } else { |
147 | 147 | $this->{$key} = $val; |
@@ -664,7 +664,7 @@ discard block |
||
664 | 664 | */ |
665 | 665 | protected function processCollection($results, callable $before = null, callable $after = null) |
666 | 666 | { |
667 | - $collection = $this->createCollection(); |
|
667 | + $collection = $this->createCollection(); |
|
668 | 668 | foreach ($results as $objData) { |
669 | 669 | $obj = $this->processModel($objData, $before, $after); |
670 | 670 | |
@@ -695,13 +695,13 @@ discard block |
||
695 | 695 | $obj = $this->factory()->create($objType); |
696 | 696 | |
697 | 697 | if ($before !== null) { |
698 | - call_user_func_array($before, [ &$obj ]); |
|
698 | + call_user_func_array($before, [&$obj]); |
|
699 | 699 | } |
700 | 700 | |
701 | 701 | $obj->setFlatData($objData); |
702 | 702 | |
703 | 703 | if ($after !== null) { |
704 | - call_user_func_array($after, [ &$obj ]); |
|
704 | + call_user_func_array($after, [&$obj]); |
|
705 | 705 | } |
706 | 706 | |
707 | 707 | return $obj; |
@@ -88,7 +88,7 @@ |
||
88 | 88 | protected function processFilter($filter) |
89 | 89 | { |
90 | 90 | if (!is_string($filter) && is_callable($filter)) { |
91 | - $expr = $this->createFilter(); |
|
91 | + $expr = $this->createFilter(); |
|
92 | 92 | /** |
93 | 93 | * @param FilterInterface $expr The new filter expression object. |
94 | 94 | * @param FilterCollectionInterface $this The context of the collection. |
@@ -88,7 +88,7 @@ |
||
88 | 88 | protected function processOrder($order) |
89 | 89 | { |
90 | 90 | if (!is_string($order) && is_callable($order)) { |
91 | - $expr = $this->createOrder(); |
|
91 | + $expr = $this->createOrder(); |
|
92 | 92 | /** |
93 | 93 | * @param OrderInterface $expr The new order expression object. |
94 | 94 | * @param OrderCollectionInterface $this The context of the collection. |