@@ -18,7 +18,7 @@ |
||
| 18 | 18 | /** @var HydrateOperation $operation */ |
| 19 | 19 | $operation = $this->operation; |
| 20 | 20 | $rowClass = $operation->getRowClass(); |
| 21 | - foreach($dataSource as $row) { |
|
| 21 | + foreach ($dataSource as $row) { |
|
| 22 | 22 | yield new $rowClass($operation->getDynamicFields(), $row); |
| 23 | 23 | } |
| 24 | 24 | } |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | if (!is_array($src)) { |
| 29 | 29 | $src = iterator_to_array($src); |
| 30 | 30 | } |
| 31 | - usort($src, function (RowInterface $row1, RowInterface $row2) use ($field, $desc) { |
|
| 31 | + usort($src, function(RowInterface $row1, RowInterface $row2) use ($field, $desc) { |
|
| 32 | 32 | $val1 = $row1->get($field); |
| 33 | 33 | $val2 = $row2->get($field); |
| 34 | 34 | if ($val1 == $val2) { |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | public function getAll(RowInterface $row) |
| 35 | 35 | { |
| 36 | 36 | $res = []; |
| 37 | - foreach(array_keys($this->dynamicFields) as $name) { |
|
| 37 | + foreach (array_keys($this->dynamicFields) as $name) { |
|
| 38 | 38 | $res[$name] = $this->get($name, $row); |
| 39 | 39 | } |
| 40 | 40 | } |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | foreach ($this->operations as $operation) { |
| 63 | 63 | $handlers[] = $factory->makeHandler($operation); |
| 64 | 64 | } |
| 65 | - usort($handlers, function (HandlerInterface $a, HandlerInterface $b) { |
|
| 65 | + usort($handlers, function(HandlerInterface $a, HandlerInterface $b) { |
|
| 66 | 66 | $aPos = $a->getPriority(); |
| 67 | 67 | $bPos = $b->getPriority(); |
| 68 | 68 | if ($aPos == $bPos) { |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | /** |
| 6 | 6 | * DataProvider operation for filtering rows. |
| 7 | 7 | */ |
| 8 | -class FilterOperation implements OperationInterface{ |
|
| 8 | +class FilterOperation implements OperationInterface { |
|
| 9 | 9 | |
| 10 | 10 | const OPERATOR_LIKE = 'like'; |
| 11 | 11 | const OPERATOR_STR_STARTS_WITH = 'str_starts_with'; |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | /** @var Builder $readyQuery */ |
| 27 | 27 | $readyQuery = null; |
| 28 | 28 | $operation = new CustomOperation( |
| 29 | - function (Builder $query) use (&$readyQuery) { |
|
| 29 | + function(Builder $query) use (&$readyQuery) { |
|
| 30 | 30 | $readyQuery = $query; |
| 31 | 31 | throw new ManualInterruptProcessingException; |
| 32 | 32 | }, |
@@ -53,13 +53,13 @@ discard block |
||
| 53 | 53 | { |
| 54 | 54 | $this->addOperations( |
| 55 | 55 | [ |
| 56 | - new CustomOperation(function (Builder $query) { |
|
| 56 | + new CustomOperation(function(Builder $query) { |
|
| 57 | 57 | return $query->get(); |
| 58 | 58 | }, Priority::HYDRATE - 1), |
| 59 | 59 | |
| 60 | 60 | // Clone query to avoid applying same query modifications multiple times |
| 61 | 61 | // when executing ->get() / ->getSql() multiple times. |
| 62 | - new CustomOperation(function (Builder $query) { |
|
| 62 | + new CustomOperation(function(Builder $query) { |
|
| 63 | 63 | return clone($query); |
| 64 | 64 | }, Priority::PREPARE - 1), |
| 65 | 65 | ] |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | /** @var QueryBuilder $readyQuery */ |
| 29 | 29 | $readyQuery = null; |
| 30 | 30 | $operation = new CustomOperation( |
| 31 | - function (QueryBuilder $query) use (&$readyQuery) { |
|
| 31 | + function(QueryBuilder $query) use (&$readyQuery) { |
|
| 32 | 32 | $readyQuery = $query; |
| 33 | 33 | throw new ManualInterruptProcessingException; |
| 34 | 34 | }, |
@@ -59,13 +59,13 @@ discard block |
||
| 59 | 59 | { |
| 60 | 60 | $this->addOperations( |
| 61 | 61 | [ |
| 62 | - new CustomOperation(function (QueryBuilder $query) { |
|
| 62 | + new CustomOperation(function(QueryBuilder $query) { |
|
| 63 | 63 | return $query->execute()->fetchAll(PDO::FETCH_OBJ); |
| 64 | 64 | }, Priority::HYDRATE - 1), |
| 65 | 65 | |
| 66 | 66 | // Clone query to avoid applying same query modifications multiple times |
| 67 | 67 | // when executing ->get() / ->getSql() multiple times. |
| 68 | - new CustomOperation(function (QueryBuilder $query) { |
|
| 68 | + new CustomOperation(function(QueryBuilder $query) { |
|
| 69 | 69 | return clone($query); |
| 70 | 70 | }, Priority::PREPARE - 1), |
| 71 | 71 | ] |