@@ -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']); |
@@ -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 | |
@@ -105,7 +105,7 @@ |
||
| 105 | 105 | { |
| 106 | 106 | foreach ($data as $key => $val) { |
| 107 | 107 | $setter = $this->setter($key); |
| 108 | - if (is_callable([ $this, $setter ])) { |
|
| 108 | + if (is_callable([$this, $setter])) { |
|
| 109 | 109 | $this->{$setter}($val); |
| 110 | 110 | } else { |
| 111 | 111 | $this->{$key} = $val; |
@@ -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. |
@@ -487,7 +487,7 @@ |
||
| 487 | 487 | } elseif ($value instanceof Traversable) { |
| 488 | 488 | return iterator_to_array($value); |
| 489 | 489 | } elseif ($value instanceof ModelInterface) { |
| 490 | - return [ $value ]; |
|
| 490 | + return [$value]; |
|
| 491 | 491 | } |
| 492 | 492 | |
| 493 | 493 | return (array)$value; |
@@ -323,7 +323,7 @@ |
||
| 323 | 323 | $properties = array_keys($model->metadata()->properties()); |
| 324 | 324 | } else { |
| 325 | 325 | // Ensure the key is always in the required fields. |
| 326 | - $properties = array_unique(array_merge([ $model->key() ], $properties)); |
|
| 326 | + $properties = array_unique(array_merge([$model->key()], $properties)); |
|
| 327 | 327 | } |
| 328 | 328 | |
| 329 | 329 | $fields = []; |