@@ -22,7 +22,7 @@ |
||
22 | 22 | * @param string $query |
23 | 23 | * @param array $parameters |
24 | 24 | */ |
25 | - public function process(string &$query, array &$parameters) |
|
25 | + public function process(string&$query, array &$parameters) |
|
26 | 26 | { |
27 | 27 | foreach ($this->preprocessors as $preprocessor) { |
28 | 28 | $preprocessor->process($query, $parameters); |
@@ -13,6 +13,7 @@ |
||
13 | 13 | * Preprocessor constructor. |
14 | 14 | * |
15 | 15 | * @param IPreprocessor[] ...$preprocessors |
16 | + * @param Preprocessor\ArrayParameter $preprocessors |
|
16 | 17 | */ |
17 | 18 | public function __construct(IPreprocessor ...$preprocessors) |
18 | 19 | { |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * @param string $query |
36 | 36 | * @param array $parameters |
37 | 37 | */ |
38 | - public function process(string &$query, array &$parameters) |
|
38 | + public function process(string&$query, array &$parameters) |
|
39 | 39 | { |
40 | 40 | $whereInParameters = $this->getWhereInParameters($parameters); |
41 | 41 | if (empty($whereInParameters)) { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | { |
56 | 56 | $whereInParameters = array_filter( |
57 | 57 | $parameters, |
58 | - function ($parameter) { |
|
58 | + function($parameter) { |
|
59 | 59 | if (!is_array($parameter) || !array_key_exists(1, $parameter)) { |
60 | 60 | return false; |
61 | 61 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * |
16 | 16 | * @return bool |
17 | 17 | */ |
18 | - public function process(string &$query, array &$parameters, array $whereInParameters) |
|
18 | + public function process(string&$query, array &$parameters, array $whereInParameters) |
|
19 | 19 | { |
20 | 20 | $partials = []; |
21 | 21 | foreach ($whereInParameters as $key => $values) { |
@@ -64,12 +64,12 @@ discard block |
||
64 | 64 | { |
65 | 65 | foreach ($partials as $key => $inQueryParts) { |
66 | 66 | $inQueryParts = array_map( |
67 | - function ($value) { |
|
67 | + function($value) { |
|
68 | 68 | return ":{$value}"; |
69 | 69 | }, |
70 | 70 | array_keys($inQueryParts) |
71 | 71 | ); |
72 | - $inQuery = implode(', ', $inQueryParts); |
|
72 | + $inQuery = implode(', ', $inQueryParts); |
|
73 | 73 | |
74 | 74 | $query = str_replace(":$key", $inQuery, $query); |
75 | 75 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * |
16 | 16 | * @return bool |
17 | 17 | */ |
18 | - public function process(string &$query, array &$parameters, array $whereInParameters) |
|
18 | + public function process(string&$query, array &$parameters, array $whereInParameters) |
|
19 | 19 | { |
20 | 20 | $partials = []; |
21 | 21 | foreach ($whereInParameters as $key => $values) { |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $query .= $queryPart; |
70 | 70 | } elseif (array_key_exists($index, $partials)) { |
71 | 71 | $partialIndex = array_map( |
72 | - function (array $valueArray) { |
|
72 | + function(array $valueArray) { |
|
73 | 73 | return $valueArray[0]; |
74 | 74 | }, |
75 | 75 | $partials[$index] |
@@ -12,5 +12,5 @@ |
||
12 | 12 | * |
13 | 13 | * @return bool |
14 | 14 | */ |
15 | - public function process(string &$query, array &$parameters); |
|
15 | + public function process(string&$query, array &$parameters); |
|
16 | 16 | } |