@@ -27,7 +27,7 @@ |
||
27 | 27 | $operation = $this->operation; |
28 | 28 | list($operator, $value) = $this->getOperatorAndValue(); |
29 | 29 | $fieldName = $operation->getField(); |
30 | - $parameterName = 'p'. md5($fieldName . $operator); |
|
30 | + $parameterName = 'p' . md5($fieldName . $operator); |
|
31 | 31 | $src->andWhere("$fieldName $operator :$parameterName"); |
32 | 32 | $src->setParameter($parameterName, $value); |
33 | 33 | return $src; |
@@ -10,7 +10,7 @@ |
||
10 | 10 | /** @var OperationInterface */ |
11 | 11 | protected $operation; |
12 | 12 | |
13 | - public function __construct(OperationInterface $operation){ |
|
13 | + public function __construct(OperationInterface $operation) { |
|
14 | 14 | |
15 | 15 | $this->operation = $operation; |
16 | 16 | } |
@@ -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) { |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | { |
24 | 24 | $readyQuery = null; |
25 | 25 | $this->addOperation( |
26 | - new CustomOperation(function (Builder $query) use (&$readyQuery) { |
|
26 | + new CustomOperation(function(Builder $query) use (&$readyQuery) { |
|
27 | 27 | $readyQuery = $query; |
28 | 28 | throw new ManualInterruptProcessingException; |
29 | 29 | }, Priority::HYDRATE - 2) |
@@ -44,13 +44,13 @@ discard block |
||
44 | 44 | { |
45 | 45 | $this->addOperations( |
46 | 46 | [ |
47 | - new CustomOperation(function (Builder $query) { |
|
47 | + new CustomOperation(function(Builder $query) { |
|
48 | 48 | return $query->get(); |
49 | 49 | }, Priority::HYDRATE - 1), |
50 | 50 | |
51 | 51 | // Clone query to avoid applying same query modifications multiple times |
52 | 52 | // when executing ->get() / ->getSql() multiple times. |
53 | - new CustomOperation(function (Builder $query) { |
|
53 | + new CustomOperation(function(Builder $query) { |
|
54 | 54 | return clone($query); |
55 | 55 | }, Priority::PREPARE - 1), |
56 | 56 | ] |
@@ -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 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | { |
26 | 26 | $readyQuery = null; |
27 | 27 | $this->addOperation( |
28 | - new CustomOperation(function (QueryBuilder $query) use (&$readyQuery) { |
|
28 | + new CustomOperation(function(QueryBuilder $query) use (&$readyQuery) { |
|
29 | 29 | $readyQuery = $query; |
30 | 30 | throw new ManualInterruptProcessingException; |
31 | 31 | }, Priority::HYDRATE - 2) |
@@ -46,13 +46,13 @@ discard block |
||
46 | 46 | { |
47 | 47 | $this->addOperations( |
48 | 48 | [ |
49 | - new CustomOperation(function (QueryBuilder $query) { |
|
49 | + new CustomOperation(function(QueryBuilder $query) { |
|
50 | 50 | return $query->execute()->fetchAll(PDO::FETCH_OBJ); |
51 | 51 | }, Priority::HYDRATE - 1), |
52 | 52 | |
53 | 53 | // Clone query to avoid applying same query modifications multiple times |
54 | 54 | // when executing ->get() / ->getSql() multiple times. |
55 | - new CustomOperation(function (QueryBuilder $query) { |
|
55 | + new CustomOperation(function(QueryBuilder $query) { |
|
56 | 56 | return clone($query); |
57 | 57 | }, Priority::PREPARE - 1), |
58 | 58 | ] |
@@ -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'; |