@@ -95,7 +95,7 @@ |
||
95 | 95 | */ |
96 | 96 | public function cant($scope) |
97 | 97 | { |
98 | - return ! $this->can($scope); |
|
98 | + return !$this->can($scope); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | /** |
@@ -24,7 +24,7 @@ |
||
24 | 24 | $pdo = DB::connection()->getPdo(); |
25 | 25 | |
26 | 26 | // trim the values |
27 | - $fieldDeclaration['allowed'] = array_map(function ($value) use ($pdo) { |
|
27 | + $fieldDeclaration['allowed'] = array_map(function($value) use ($pdo) { |
|
28 | 28 | return $pdo->quote(trim($value)); |
29 | 29 | }, $allowed); |
30 | 30 |
@@ -21,7 +21,7 @@ |
||
21 | 21 | $pdo = DB::connection()->getPdo(); |
22 | 22 | |
23 | 23 | // trim the values |
24 | - $allowed = array_map(function ($value) use ($pdo) { |
|
24 | + $allowed = array_map(function($value) use ($pdo) { |
|
25 | 25 | return $pdo->quote(trim($value)); |
26 | 26 | }, $allowed); |
27 | 27 |
@@ -89,7 +89,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | /** |
@@ -124,7 +124,7 @@ |
||
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 |
@@ -243,7 +243,7 @@ discard block |
||
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 |
||
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 | } |
@@ -21,7 +21,7 @@ |
||
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 |
@@ -22,13 +22,13 @@ discard block |
||
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 |
||
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 | } |
@@ -25,7 +25,7 @@ |
||
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 |