Completed
Push — 4.0 ( 243a2b...1abf1e )
by David
50:20 queued 27:28
created
src/Mouf/Database/TDBM/AbstractTDBMObject.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     public function get($var, $tableName = null)
179 179
     {
180 180
         if ($tableName === null) {
181
-            if (count($this->dbRows) > 1) {
181
+            if (count($this->dbRows)>1) {
182 182
                 throw new TDBMException('This object is based on several tables. You must specify which table you are retrieving data from.');
183 183
             } elseif (count($this->dbRows) === 1) {
184 184
                 $tableName = array_keys($this->dbRows)[0];
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
     public function has($var, $tableName = null)
207 207
     {
208 208
         if ($tableName === null) {
209
-            if (count($this->dbRows) > 1) {
209
+            if (count($this->dbRows)>1) {
210 210
                 throw new TDBMException('This object is based on several tables. You must specify which table you are retrieving data from.');
211 211
             } elseif (count($this->dbRows) === 1) {
212 212
                 $tableName = array_keys($this->dbRows)[0];
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
     public function set($var, $value, $tableName = null)
228 228
     {
229 229
         if ($tableName === null) {
230
-            if (count($this->dbRows) > 1) {
230
+            if (count($this->dbRows)>1) {
231 231
                 throw new TDBMException('This object is based on several tables. You must specify which table you are retrieving data from.');
232 232
             } elseif (count($this->dbRows) === 1) {
233 233
                 $tableName = array_keys($this->dbRows)[0];
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
     public function setRef($foreignKeyName, AbstractTDBMObject $bean, $tableName = null)
254 254
     {
255 255
         if ($tableName === null) {
256
-            if (count($this->dbRows) > 1) {
256
+            if (count($this->dbRows)>1) {
257 257
                 throw new TDBMException('This object is based on several tables. You must specify which table you are retrieving data from.');
258 258
             } elseif (count($this->dbRows) === 1) {
259 259
                 $tableName = array_keys($this->dbRows)[0];
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
     public function getRef($foreignKeyName, $tableName = null)
281 281
     {
282 282
         if ($tableName === null) {
283
-            if (count($this->dbRows) > 1) {
283
+            if (count($this->dbRows)>1) {
284 284
                 throw new TDBMException('This object is based on several tables. You must specify which table you are retrieving data from.');
285 285
             } elseif (count($this->dbRows) === 1) {
286 286
                 $tableName = array_keys($this->dbRows)[0];
Please login to merge, or discard this patch.
src/Mouf/Database/TDBM/TDBMObjectArray.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         $cnt = count($this);
32 32
         if ($cnt == 1) {
33 33
             return $this[0]->__get($var);
34
-        } elseif ($cnt > 1) {
34
+        } elseif ($cnt>1) {
35 35
             throw new TDBMException('Array contains many objects! Use getarray_'.$var.' to retrieve an array of '.$var);
36 36
         } else {
37 37
             throw new TDBMException('Array contains no objects');
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $cnt = count($this);
44 44
         if ($cnt == 1) {
45 45
             return $this[0]->__set($var, $value);
46
-        } elseif ($cnt > 1) {
46
+        } elseif ($cnt>1) {
47 47
             throw new TDBMException('Array contains many objects! Use setarray_'.$var.' to set the array of '.$var);
48 48
         } else {
49 49
             throw new TDBMException('Array contains no objects');
Please login to merge, or discard this patch.
src/Mouf/Database/TDBM/PageIterator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      */
113 113
     public function getCurrentPage()
114 114
     {
115
-        return floor($this->offset / $this->limit) + 1;
115
+        return floor($this->offset/$this->limit)+1;
116 116
     }
117 117
 
118 118
     /**
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
      */
252 252
     public function jsonSerialize()
253 253
     {
254
-        return array_map(function (AbstractTDBMObject $item) {
254
+        return array_map(function(AbstractTDBMObject $item) {
255 255
             return $item->jsonSerialize();
256 256
         }, $this->toArray());
257 257
     }
Please login to merge, or discard this patch.