@@ -84,7 +84,7 @@ |
||
84 | 84 | return $value->getValue(); |
85 | 85 | |
86 | 86 | case is_int($value) || ctype_digit($value): |
87 | - return (int) $value; |
|
87 | + return (int)$value; |
|
88 | 88 | |
89 | 89 | case is_float($value): |
90 | 90 | // Convert to non-locale aware float to prevent possible commas |
@@ -25,11 +25,11 @@ |
||
25 | 25 | |
26 | 26 | public function getAllowedCount() |
27 | 27 | { |
28 | - return (int) $this->meta['total']; |
|
28 | + return (int)$this->meta['total']; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | public function getTotalCount() |
32 | 32 | { |
33 | - return (int) $this->meta['total_found']; |
|
33 | + return (int)$this->meta['total_found']; |
|
34 | 34 | } |
35 | 35 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | { |
10 | 10 | public function __construct(array $result, array $rawMeta) |
11 | 11 | { |
12 | - parent::__construct(array_map(function ($result) { |
|
12 | + parent::__construct(array_map(function($result) { |
|
13 | 13 | return new SimpleResultSet($result); |
14 | 14 | }, $result), $rawMeta); |
15 | 15 | } |
@@ -69,7 +69,7 @@ |
||
69 | 69 | { |
70 | 70 | $this->initialize(); |
71 | 71 | |
72 | - if (false === $value = $this->pdo->quote((string) $value)) { |
|
72 | + if (false === $value = $this->pdo->quote((string)$value)) { |
|
73 | 73 | throw new ConnectionException($this->pdo->errorInfo(), $this->pdo->errorCode()); |
74 | 74 | } |
75 | 75 |
@@ -76,14 +76,14 @@ discard block |
||
76 | 76 | return $this; |
77 | 77 | } |
78 | 78 | |
79 | - return $this->add('select', (array) $select); |
|
79 | + return $this->add('select', (array)$select); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | public function addSelect($select) |
83 | 83 | { |
84 | 84 | $this->type = self::TYPE_SELECT; |
85 | 85 | |
86 | - return $this->add('select', (array) $select, true); |
|
86 | + return $this->add('select', (array)$select, true); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | public function update($index) |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | */ |
184 | 184 | public function facet($facet, $by = null, $order = null, $direction = null, $limit = null, $skip = 0) |
185 | 185 | { |
186 | - $facet = (array) $facet; |
|
186 | + $facet = (array)$facet; |
|
187 | 187 | |
188 | 188 | return $this->add('facet', compact('facet', 'by', 'order', 'direction', 'limit', 'skip'), true); |
189 | 189 | } |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | |
350 | 350 | //TODO: inject limit, skip as parameters for better caching? Or just move caching to upper layer |
351 | 351 | if ($this->sqlParts['maxResults']) { |
352 | - $query .= ' LIMIT '.(int) $this->sqlParts['firstResult'].', '.(int) $this->sqlParts['maxResults']; |
|
352 | + $query .= ' LIMIT '.(int)$this->sqlParts['firstResult'].', '.(int)$this->sqlParts['maxResults']; |
|
353 | 353 | } |
354 | 354 | |
355 | 355 | $query .= $this->buildOptionsPart() |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | $facetPart .= ' ORDER BY '.$facet['order'].$this->getDirection($facet['order'], $facet['direction']); |
485 | 485 | } |
486 | 486 | if ($facet['limit']) { |
487 | - $facetPart .= ' LIMIT '.(int) $facet['skip'].', '.(int) $facet['limit']; |
|
487 | + $facetPart .= ' LIMIT '.(int)$facet['skip'].', '.(int)$facet['limit']; |
|
488 | 488 | } |
489 | 489 | |
490 | 490 | $facetParts[] = $facetPart; |