Completed
Push — master ( 6a706e...7fd4a2 )
by Konstantin
12:25
created
QueryBuilder.php 2 patches
Doc Comments   +15 added lines patch added patch discarded remove patch
@@ -69,6 +69,9 @@  discard block
 block discarded – undo
69 69
         return $this->conn->getEscaper();
70 70
     }
71 71
 
72
+    /**
73
+     * @param string $select
74
+     */
72 75
     public function select($select = null)
73 76
     {
74 77
         $this->type = self::TYPE_SELECT;
@@ -100,6 +103,9 @@  discard block
 block discarded – undo
100 103
         return $this->add('from', array('table' => $index));
101 104
     }
102 105
 
106
+    /**
107
+     * @param string $index
108
+     */
103 109
     public function replace($index)
104 110
     {
105 111
         $this->type = self::TYPE_REPLACE;
@@ -107,6 +113,9 @@  discard block
 block discarded – undo
107 113
         return $this->add('from', array('table' => $index));
108 114
     }
109 115
 
116
+    /**
117
+     * @param string $index
118
+     */
110 119
     public function delete($index)
111 120
     {
112 121
         $this->type = self::TYPE_DELETE;
@@ -129,6 +138,9 @@  discard block
 block discarded – undo
129 138
         return $this->add('values', $values, true);
130 139
     }
131 140
 
141
+    /**
142
+     * @param string $index
143
+     */
132 144
     public function from($index)
133 145
     {
134 146
         return $this->add('from', array('table' => $index));
@@ -139,6 +151,9 @@  discard block
 block discarded – undo
139 151
         return $this->add('from', array('table' => $index), true);
140 152
     }
141 153
 
154
+    /**
155
+     * @param string $where
156
+     */
142 157
     public function where($where)
143 158
     {
144 159
         return $this->add('where', $where);
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -76,14 +76,14 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
Escaper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
Query/ResultSet.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
Query/MultiResultSet.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Connection/PdoConnection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.