Completed
Push — master ( 553b6e...36d08f )
by CodexShaper
49:40 queued 44:32
created
src/Database/Drivers/MongoDB/Traits/IndexTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     protected static function checkUnique(IndexInfo $index)
91 91
     {
92
-        return $index->isUnique() && ! $index->isSparse() && ! static::checkDescending($index) ? true : false;
92
+        return $index->isUnique() && !$index->isSparse() && !static::checkDescending($index) ? true : false;
93 93
     }
94 94
 
95 95
     /**
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     protected static function checkUniqueDesc(IndexInfo $index)
101 101
     {
102
-        return $index->isUnique() && ! $index->isSparse() && static::checkDescending($index) ? true : false;
102
+        return $index->isUnique() && !$index->isSparse() && static::checkDescending($index) ? true : false;
103 103
     }
104 104
 
105 105
     /**
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      */
110 110
     protected static function checkSparse(IndexInfo $index)
111 111
     {
112
-        return $index->isSparse() && ! static::checkDescending($index) ? true : false;
112
+        return $index->isSparse() && !static::checkDescending($index) ? true : false;
113 113
     }
114 114
 
115 115
     /**
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      */
120 120
     protected static function checkSparseUnique(IndexInfo $index)
121 121
     {
122
-        return $index->isSparse() && $index->isUnique() && ! static::checkDescending($index) ? true : false;
122
+        return $index->isSparse() && $index->isUnique() && !static::checkDescending($index) ? true : false;
123 123
     }
124 124
 
125 125
     /**
Please login to merge, or discard this patch.
src/Database/Drivers/MongoDB/Type.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
      */
125 125
     public static function dateTime($milliseconds = null)
126 126
     {
127
-        if (! is_int($milliseconds) || ! is_float($milliseconds) || ! is_string($milliseconds) || ! $milliseconds instanceof \DateTimeInterface) {
127
+        if (!is_int($milliseconds) || !is_float($milliseconds) || !is_string($milliseconds) || !$milliseconds instanceof \DateTimeInterface) {
128 128
             throw new \Exception($milliseconds.' integer or float or string or instance of DateTimeInterface');
129 129
         }
130 130
 
Please login to merge, or discard this patch.
src/Database/Drivers/MongoDB.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
                         $columnNames[] = $columnName;
244 244
                     }
245 245
 
246
-                    if ($id != '' && ! in_array($newField, $columnNames)) {
246
+                    if ($id != '' && !in_array($newField, $columnNames)) {
247 247
                         $update['$set'] = [$newField => ''];
248 248
                         $collection->updateOne(
249 249
                             ['_id' => new \MongoDB\BSON\ObjectID($id)],
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
         $unsets = [];
273 273
 
274 274
         foreach ($columns as $column) {
275
-            if (! in_array($column, $newFields)) {
275
+            if (!in_array($column, $newFields)) {
276 276
                 $unsets[$column] = '';
277 277
             }
278 278
         }
Please login to merge, or discard this patch.
src/Database/Platforms/Platform.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     {
22 22
         $platform = __NAMESPACE__.'\\'.ucfirst($platformName);
23 23
 
24
-        if (! class_exists($platform)) {
24
+        if (!class_exists($platform)) {
25 25
             throw new \Exception("Platform {$platformName} doesn't exist");
26 26
         }
27 27
 
Please login to merge, or discard this patch.
src/Database/Schema/UpdateManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,13 +22,13 @@  discard block
 block discarded – undo
22 22
      */
23 23
     public function update($table)
24 24
     {
25
-        if (! is_array($table)) {
25
+        if (!is_array($table)) {
26 26
             $table = json_decode($table, true);
27 27
         }
28 28
 
29 29
         $tableName = $table['oldName'];
30 30
 
31
-        if (! SchemaManager::getInstance()->tablesExist($tableName)) {
31
+        if (!SchemaManager::getInstance()->tablesExist($tableName)) {
32 32
             throw SchemaException::tableDoesNotExist($table['oldName']);
33 33
         }
34 34
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
         // Add new table name to tableDiff
86 86
         if ($newTableName) {
87
-            if (! $tableDiff) {
87
+            if (!$tableDiff) {
88 88
                 $tableDiff = new TableDiff($this->data['oldName']);
89 89
                 $tableDiff->fromTable = $this->originalTable;
90 90
             }
Please login to merge, or discard this patch.
src/Database/Schema/SchemaManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      */
26 26
     public static function getInstance()
27 27
     {
28
-        if (! self::$schemaManager) {
28
+        if (!self::$schemaManager) {
29 29
             new self();
30 30
         }
31 31
 
Please login to merge, or discard this patch.
src/Database/Schema/Index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     public static function create($index)
21 21
     {
22 22
         $indexColumns = $index['columns'];
23
-        if (! is_array($indexColumns)) {
23
+        if (!is_array($indexColumns)) {
24 24
             $indexColumns = [$indexColumns];
25 25
         }
26 26
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     {
104 104
         if ($index->isPrimary()) {
105 105
             return static::PRIMARY;
106
-        } elseif ($index->isUnique() && ! $index->isPrimary()) {
106
+        } elseif ($index->isUnique() && !$index->isPrimary()) {
107 107
             return static::UNIQUE;
108 108
         } elseif ($index->isSimpleIndex()) {
109 109
             return static::INDEX;
Please login to merge, or discard this patch.
src/Database/Schema/ForeignKey.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
     {
77 77
         $table = trim($table);
78 78
 
79
-        if (! static::tableExists($table)) {
79
+        if (!static::tableExists($table)) {
80 80
             throw SchemaException::tableDoesNotExist($table);
81 81
         }
82 82
 
Please login to merge, or discard this patch.
src/Database/Schema/Table.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      */
88 88
     public static function create($table)
89 89
     {
90
-        if (! is_array($table)) {
90
+        if (!is_array($table)) {
91 91
             $table = json_decode($table, true);
92 92
         }
93 93
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      */
112 112
     public static function update($table)
113 113
     {
114
-        if (! is_array($table)) {
114
+        if (!is_array($table)) {
115 115
             $table = json_decode($table, true);
116 116
         }
117 117
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      */
148 148
     public static function prepareTable($table)
149 149
     {
150
-        if (! is_array($table)) {
150
+        if (!is_array($table)) {
151 151
             $table = json_decode($table, true);
152 152
         }
153 153
 
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
             return MongoDB::hasCollection($tableName);
262 262
         }
263 263
 
264
-        if (! SchemaManager::getInstance()->tablesExist($tableName)) {
264
+        if (!SchemaManager::getInstance()->tablesExist($tableName)) {
265 265
             throw SchemaException::tableDoesNotExist($tableName);
266 266
         }
267 267
 
@@ -284,8 +284,8 @@  discard block
 block discarded – undo
284 284
         $options['path'] = Paginator::resolveCurrentPath();
285 285
         $items = static::all();
286 286
         $collection = $items instanceof Collection ? $items : Collection::make($items);
287
-        if (! empty($query)) {
288
-            $collection = $collection->filter(function ($value, $key) use ($query) {
287
+        if (!empty($query)) {
288
+            $collection = $collection->filter(function($value, $key) use ($query) {
289 289
                 return false !== stristr($value, $query);
290 290
             });
291 291
         }
Please login to merge, or discard this patch.