Passed
Push — master ( 1d88b8...7f1e16 )
by CodexShaper
04:23
created
src/Database/Types/Mysql/EnumType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
         $pdo = DB::connection()->getPdo();
20 20
 
21 21
         // trim the values
22
-        $allowed = array_map(function ($value) use ($pdo) {
22
+        $allowed = array_map(function($value) use ($pdo) {
23 23
             return $pdo->quote(trim($value));
24 24
         }, $allowed);
25 25
 
26
-        return 'enum(' . implode(', ', $allowed) . ')';
26
+        return 'enum('.implode(', ', $allowed).')';
27 27
     }
28 28
 }
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
@@ -40,13 +40,13 @@
 block discarded – undo
40 40
 
41 41
     protected static function getCustomTypes($platformName)
42 42
     {
43
-        $customPlatformDir = __DIR__ . DIRECTORY_SEPARATOR . $platformName . DIRECTORY_SEPARATOR;
43
+        $customPlatformDir = __DIR__.DIRECTORY_SEPARATOR.$platformName.DIRECTORY_SEPARATOR;
44 44
 
45 45
         $customTypes = [];
46 46
 
47
-        foreach (glob($customPlatformDir . '*.php') as $file) {
47
+        foreach (glob($customPlatformDir.'*.php') as $file) {
48 48
             $className     = basename($file, ".php");
49
-            $customTypes[] = __NAMESPACE__ . '\\' . $platformName . '\\' . $className;
49
+            $customTypes[] = __NAMESPACE__.'\\'.$platformName.'\\'.$className;
50 50
         }
51 51
 
52 52
         return $customTypes;
Please login to merge, or discard this patch.
src/Database/Drivers/MongoDB/Schema/Blueprint.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@
 block discarded – undo
130 130
             $transform = [];
131 131
 
132 132
             foreach ($indexOrColumns as $column) {
133
-                $transform[$column] = $column . '_1';
133
+                $transform[$column] = $column.'_1';
134 134
             }
135 135
 
136 136
             $indexOrColumns = implode('_', $transform);
Please login to merge, or discard this patch.
src/Database/Drivers/MongoDB/Index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
                         break;
145 145
                 }
146 146
 
147
-                $options['name'] = strtolower($collection->getCollectionName() . "_" . $column . "_" . $type);
147
+                $options['name'] = strtolower($collection->getCollectionName()."_".$column."_".$type);
148 148
 
149 149
                 $options['ns'] = $collection->getNamespace();
150 150
 
Please login to merge, or discard this patch.
src/Database/Drivers/MongoDB/Type.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     public static function javascript(string $code, $scope = [])
47 47
     {
48 48
         if (!is_array($scope) || !is_array()) {
49
-            throw new \Exception($scope . " should be array or object");
49
+            throw new \Exception($scope." should be array or object");
50 50
 
51 51
         }
52 52
 
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     public static function dateTime($milliseconds = null)
82 82
     {
83 83
         if (!is_int($milliseconds) || !is_float($milliseconds) || !is_string($milliseconds) || !$milliseconds instanceof \DateTimeInterface) {
84
-            throw new \Exception($milliseconds . " integer or float or string or instance of DateTimeInterface");
84
+            throw new \Exception($milliseconds." integer or float or string or instance of DateTimeInterface");
85 85
 
86 86
         }
87 87
         return new UTCDateTime($milliseconds);
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
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
     public function getNamespace($databaseName, $collectionName)
49 49
     {
50
-        return $databaseName . '.' . $collectionName;
50
+        return $databaseName.'.'.$collectionName;
51 51
     }
52 52
 
53 53
     public function getCollections()
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $oldName        = $collection['oldName'];
97 97
         $collectionName = $oldName;
98 98
         $connection     = config('database.default');
99
-        $database       = config('database.connections.' . $connection . ".database");
99
+        $database       = config('database.connections.'.$connection.".database");
100 100
         $fromNs         = $this->getNamespace($database, $oldName);
101 101
         $toNs           = $this->getNamespace($database, $newName);
102 102
 
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
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
         // DoctrineType::addType('varchar', 'App\CodexShaper\Database\Types\Common\VarCharType');
114 114
         // SchemaManager::getInstance()->getDatabasePlatform()->registerDoctrineTypeMapping('db_varchar', 'varchar');
115 115
 
116
-        $conn = 'database.connections.' . config('database.default');
116
+        $conn = 'database.connections.'.config('database.default');
117 117
 
118
-        $table['options']['collate'] = config($conn . '.collation', 'utf8mb4_unicode_ci');
119
-        $table['options']['charset'] = config($conn . '.charset', 'utf8mb4');
118
+        $table['options']['collate'] = config($conn.'.collation', 'utf8mb4_unicode_ci');
119
+        $table['options']['charset'] = config($conn.'.charset', 'utf8mb4');
120 120
 
121 121
         $tableName   = $table['name'];
122 122
         $columns     = $table['columns'];
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         $items           = static::all();
213 213
         $collection      = $items instanceof Collection ? $items : Collection::make($items);
214 214
         if (!empty($query)) {
215
-            $collection = $collection->filter(function ($value, $key) use ($query) {
215
+            $collection = $collection->filter(function($value, $key) use ($query) {
216 216
                 return false !== stristr($value, $query);
217 217
             });
218 218
         }
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
@@ -53,9 +53,9 @@
 block discarded – undo
53 53
 
54 54
     public static function createName(array $columns, $type, $table = null)
55 55
     {
56
-        $table = isset($table) ? trim($table) . '_' : '';
56
+        $table = isset($table) ? trim($table).'_' : '';
57 57
         $type  = trim($type);
58
-        $name  = strtolower($table . implode('_', $columns) . '_' . $type);
58
+        $name  = strtolower($table.implode('_', $columns).'_'.$type);
59 59
 
60 60
         return str_replace(['-', '.'], '_', $name);
61 61
     }
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
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
     public static function getPlatform($platformName)
14 14
     {
15
-        $platform = __NAMESPACE__ . '\\' . ucfirst($platformName);
15
+        $platform = __NAMESPACE__.'\\'.ucfirst($platformName);
16 16
 
17 17
         if (!class_exists($platform)) {
18 18
             throw new \Exception("Platform {$platformName} doesn't exist");
Please login to merge, or discard this patch.