@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | // paging |
126 | 126 | return $limited |
127 | 127 | ? array_slice($results, intval($this->queryBuilder->getOffset()), $this->queryBuilder->getLimit()) |
128 | - : $results ; |
|
128 | + : $results; |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | /** |
@@ -305,6 +305,6 @@ discard block |
||
305 | 305 | $a = $resultA->offsetGet($this->sortingOrder->getColumnName()); |
306 | 306 | $b = $resultB->offsetGet($this->sortingOrder->getColumnName()); |
307 | 307 | |
308 | - return (IQueryBuilder::ORDER_ASC == $sortingDirection) ? $a <=> $b : $b <=> $a ; |
|
308 | + return (IQueryBuilder::ORDER_ASC == $sortingDirection) ? $a <=> $b : $b <=> $a; |
|
309 | 309 | } |
310 | 310 | } |
@@ -27,7 +27,6 @@ |
||
27 | 27 | { |
28 | 28 | // ... |
29 | 29 | } |
30 | - |
|
31 | 30 | */ |
32 | 31 | interface ICanFill |
33 | 32 | { |
@@ -48,7 +48,7 @@ |
||
48 | 48 | } |
49 | 49 | foreach ($this->recordsInJoin as $record) { |
50 | 50 | $foreignKeys = $record->getRecord()->getMapper()->getForeignKeys(); |
51 | - $fk = empty($knownAs) ? $storeKey : $knownAs ; |
|
51 | + $fk = empty($knownAs) ? $storeKey : $knownAs; |
|
52 | 52 | if (isset($foreignKeys[$fk])) { |
53 | 53 | $recordClassName = $foreignKeys[$fk]->getRemoteRecord(); |
54 | 54 | try { |
@@ -17,19 +17,19 @@ |
||
17 | 17 | public const ORDER_ASC = 'ASC'; |
18 | 18 | public const ORDER_DESC = 'DESC'; |
19 | 19 | |
20 | - public const OPERATION_NULL = 'nul'; // is null |
|
21 | - public const OPERATION_NNULL = 'nnul'; // is not null |
|
22 | - public const OPERATION_EQ = 'eq'; // = |
|
23 | - public const OPERATION_NEQ = 'neq'; // != |
|
24 | - public const OPERATION_GT = 'gt'; // > |
|
25 | - public const OPERATION_GTE = 'gte'; // >= |
|
26 | - public const OPERATION_LT = 'lt'; // < |
|
27 | - public const OPERATION_LTE = 'lte'; // <= |
|
28 | - public const OPERATION_LIKE = 'like'; // like... |
|
20 | + public const OPERATION_NULL = 'nul'; // is null |
|
21 | + public const OPERATION_NNULL = 'nnul'; // is not null |
|
22 | + public const OPERATION_EQ = 'eq'; // = |
|
23 | + public const OPERATION_NEQ = 'neq'; // != |
|
24 | + public const OPERATION_GT = 'gt'; // > |
|
25 | + public const OPERATION_GTE = 'gte'; // >= |
|
26 | + public const OPERATION_LT = 'lt'; // < |
|
27 | + public const OPERATION_LTE = 'lte'; // <= |
|
28 | + public const OPERATION_LIKE = 'like'; // like... |
|
29 | 29 | public const OPERATION_NLIKE = 'nlike'; // not like |
30 | - public const OPERATION_REXP = 'rexp'; // regex |
|
31 | - public const OPERATION_IN = 'in'; // in () |
|
32 | - public const OPERATION_NIN = 'nin'; // not in () |
|
30 | + public const OPERATION_REXP = 'rexp'; // regex |
|
31 | + public const OPERATION_IN = 'in'; // in () |
|
32 | + public const OPERATION_NIN = 'nin'; // not in () |
|
33 | 33 | |
34 | 34 | public const AGGREGATE_AVG = 'AVG'; |
35 | 35 | public const AGGREGATE_COUNT = 'COUNT'; |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | */ |
410 | 410 | protected function correctTable(string $table): string |
411 | 411 | { |
412 | - return empty($table) ? $this->getBasicRecord()->getMapper()->getAlias() : $table ; |
|
412 | + return empty($table) ? $this->getBasicRecord()->getMapper()->getAlias() : $table; |
|
413 | 413 | } |
414 | 414 | |
415 | 415 | /** |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | */ |
421 | 421 | protected function correctColumn(string $table, string $column) |
422 | 422 | { |
423 | - $record = !empty($table) ? $this->recordLookup($table)->getRecord() : $this->getBasicRecord() ; |
|
423 | + $record = !empty($table) ? $this->recordLookup($table)->getRecord() : $this->getBasicRecord(); |
|
424 | 424 | if (empty($record)) { |
425 | 425 | // @codeCoverageIgnoreStart |
426 | 426 | throw new MapperException(sprintf('Unknown relation table *%s*', $table)); |
@@ -151,7 +151,7 @@ |
||
151 | 151 | |
152 | 152 | public function rowCount(): ?int |
153 | 153 | { |
154 | - return $this->lastStatement ? intval(\oci_num_rows($this->lastStatement)) : null ; |
|
154 | + return $this->lastStatement ? intval(\oci_num_rows($this->lastStatement)) : null; |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | public function beginTransaction(): bool |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $connection->setAttribute(PDO::ATTR_PERSISTENT, true); |
38 | 38 | } |
39 | 39 | |
40 | - foreach ($this->attributes as $key => $value){ |
|
40 | + foreach ($this->attributes as $key => $value) { |
|
41 | 41 | $connection->setAttribute($key, $value); |
42 | 42 | } |
43 | 43 |
@@ -62,10 +62,10 @@ discard block |
||
62 | 62 | { |
63 | 63 | # First convert associative array to numeric indexed array |
64 | 64 | $workArray = array_values($array); |
65 | - $returnString = ''; # Initialize return string |
|
66 | - $arraySize = count($workArray); # Get size of array |
|
65 | + $returnString = ''; # Initialize return string |
|
66 | + $arraySize = count($workArray); # Get size of array |
|
67 | 67 | |
68 | - for ($i=0; $i<$arraySize; $i++) { |
|
68 | + for ($i = 0; $i < $arraySize; $i++) { |
|
69 | 69 | # Nested array, process nest item |
70 | 70 | if (is_array($workArray[$i])) { |
71 | 71 | $returnString .= $this->str_putcsv($workArray[$i], $delimiter, $enclosure, $terminator); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | switch (gettype($workArray[$i])) { |
74 | 74 | # Manually set some strings |
75 | 75 | case "NULL": $_spFormat = ''; break; |
76 | - case "boolean": $_spFormat = (true == $workArray[$i]) ? 'true': 'false'; break; |
|
76 | + case "boolean": $_spFormat = (true == $workArray[$i]) ? 'true' : 'false'; break; |
|
77 | 77 | # Make sure sprintf has a good datatype to work with |
78 | 78 | case "integer": $_spFormat = '%i'; break; |
79 | 79 | case "double": $_spFormat = '%0.2f'; break; |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | case "resource": |
84 | 84 | default: $_spFormat = ''; |
85 | 85 | } |
86 | - $returnString .= sprintf('%2$s'.$_spFormat.'%2$s', $workArray[$i], $enclosure); |
|
87 | - $returnString .= ($i < ($arraySize-1)) ? $delimiter : $terminator; |
|
86 | + $returnString .= sprintf('%2$s' . $_spFormat . '%2$s', $workArray[$i], $enclosure); |
|
87 | + $returnString .= ($i < ($arraySize - 1)) ? $delimiter : $terminator; |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | # Done the workload, return the output information |