Completed
Push — master ( 6f54d6...ffe8b5 )
by CodexShaper
05:45
created
src/Database/Drivers/MongoDB/Index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
                 $indexType = $indexDetails['type'];
83 83
                 $options = $indexDetails['options'];
84 84
 
85
-                $options['name'] = strtolower($collection->getCollectionName() . '_' . $column . '_' . $type);
85
+                $options['name'] = strtolower($collection->getCollectionName().'_'.$column.'_'.$type);
86 86
 
87 87
                 $options['ns'] = $collection->getNamespace();
88 88
 
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
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
                         $columnNames[] = $columnName;
235 235
                     }
236 236
 
237
-                    if ($id != '' && ! in_array($newField, $columnNames)) {
237
+                    if ($id != '' && !in_array($newField, $columnNames)) {
238 238
                         $update['$set'] = [$newField => ''];
239 239
                         $collection->updateOne(
240 240
                             ['_id' => new \MongoDB\BSON\ObjectID($id)],
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
         $unsets = [];
264 264
 
265 265
         foreach ($columns as $column) {
266
-            if (! in_array($column, $newFields)) {
266
+            if (!in_array($column, $newFields)) {
267 267
                 $unsets[$column] = '';
268 268
         }
269 269
 
Please login to merge, or discard this patch.
src/Database/Types/Type.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,13 +54,13 @@
 block discarded – undo
54 54
      */
55 55
     protected static function getCustomTypes($platformName)
56 56
     {
57
-        $customPlatformDir = __DIR__ . DIRECTORY_SEPARATOR . $platformName . DIRECTORY_SEPARATOR;
57
+        $customPlatformDir = __DIR__.DIRECTORY_SEPARATOR.$platformName.DIRECTORY_SEPARATOR;
58 58
 
59 59
         $customTypes = [];
60 60
 
61
-        foreach (glob($customPlatformDir . '*.php') as $file) {
61
+        foreach (glob($customPlatformDir.'*.php') as $file) {
62 62
             $className = basename($file, ".php");
63
-            $customTypes[] = __NAMESPACE__ . '\\' . $platformName . '\\' . $className;
63
+            $customTypes[] = __NAMESPACE__.'\\'.$platformName.'\\'.$className;
64 64
         }
65 65
 
66 66
         return $customTypes;
Please login to merge, or discard this patch.
src/Database/Schema/Table.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
 
152 152
         Type::registerCustomTypes();
153 153
 
154
-        $conn = 'database.connections.' . config('database.default');
154
+        $conn = 'database.connections.'.config('database.default');
155 155
 
156
-        $table['options']['collate'] = $table['options']['collation'] ?? config($conn . '.collation', 'utf8mb4_unicode_ci');
156
+        $table['options']['collate'] = $table['options']['collation'] ?? config($conn.'.collation', 'utf8mb4_unicode_ci');
157 157
         if (Driver::isMysql()) {
158
-            $table['options']['charset'] = $table['options']['charset'] ?? config($conn . '.charset', 'utf8mb4');
158
+            $table['options']['charset'] = $table['options']['charset'] ?? config($conn.'.charset', 'utf8mb4');
159 159
         }
160 160
 
161 161
         $tableName = $table['name'];
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
         $items = static::all();
280 280
         $collection = $items instanceof Collection ? $items : Collection::make($items);
281 281
         if (!empty($query)) {
282
-            $collection = $collection->filter(function ($value, $key) use ($query) {
282
+            $collection = $collection->filter(function($value, $key) use ($query) {
283 283
                 return false !== stristr($value, $query);
284 284
             });
285 285
         }
Please login to merge, or discard this patch.
src/Database/Schema/ForeignKey.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@
 block discarded – undo
56 56
      */
57 57
     public static function createName($columns, $type, $table = null)
58 58
     {
59
-        $table = isset($table) ? trim($table) . '_' : '';
59
+        $table = isset($table) ? trim($table).'_' : '';
60 60
         $type = trim($type);
61
-        $name = strtolower($table . implode('_', $columns) . '_' . $type);
61
+        $name = strtolower($table.implode('_', $columns).'_'.$type);
62 62
 
63 63
         return str_replace(['-', '.'], '_', $name);
64 64
     }
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
@@ -68,9 +68,9 @@
 block discarded – undo
68 68
      */
69 69
     public static function createName($columns, $type, $table = null)
70 70
     {
71
-        $table = isset($table) ? trim($table) . '_' : '';
71
+        $table = isset($table) ? trim($table).'_' : '';
72 72
         $type = trim($type);
73
-        $name = strtolower($table . implode('_', $columns) . '_' . $type);
73
+        $name = strtolower($table.implode('_', $columns).'_'.$type);
74 74
 
75 75
         return str_replace(['-', '.'], '_', $name);
76 76
     }
Please login to merge, or discard this patch.
src/Http/Controllers/DatabaseController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@
 block discarded – undo
178 178
                 'name' => $column['name']])->first()) {
179 179
                 return response()->json([
180 180
                     'success' => false,
181
-                    'errors' => ["Field name must be unique. " . $column['name'] . " are duplicate"],
181
+                    'errors' => ["Field name must be unique. ".$column['name']." are duplicate"],
182 182
                 ], 400);
183 183
             }
184 184
 
Please login to merge, or discard this patch.
src/Http/Controllers/RelationController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         $prefix = (Driver::isMongoDB()) ? "_" : "";
48 48
 
49 49
         foreach ($fields as $fld) {
50
-            if ($fld->id == $field->{$prefix . "id"}) {
50
+            if ($fld->id == $field->{$prefix."id"}) {
51 51
 
52 52
                 $relationship = $fld->settings;
53 53
                 $localTable = $relationship['localTable'];
Please login to merge, or discard this patch.
src/Http/Controllers/CrudController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
             $columns = $request->fields;
33 33
             $permission = $request->isCrudExists ? 'update' : 'create';
34 34
 
35
-            if (($response = DBM::authorize('crud.' . $permission)) !== true) {
35
+            if (($response = DBM::authorize('crud.'.$permission)) !== true) {
36 36
                 return $response;
37 37
             }
38 38
 
Please login to merge, or discard this patch.