Passed
Push — master ( 658c95...7b2ed5 )
by CodexShaper
05:31
created
src/Database/Drivers/MongoDB.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function getNamespace($databaseName, $collectionName)
73 73
     {
74
-        return $databaseName . '.' . $collectionName;
74
+        return $databaseName.'.'.$collectionName;
75 75
     }
76 76
     /**
77 77
      * Get the all collections.
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         $oldName        = $collection['oldName'];
153 153
         $collectionName = $oldName;
154 154
         $connection     = config('database.default');
155
-        $database       = config('database.connections.' . $connection . ".database");
155
+        $database       = config('database.connections.'.$connection.".database");
156 156
         $fromNs         = $this->getNamespace($database, $oldName);
157 157
         $toNs           = $this->getNamespace($database, $newName);
158 158
 
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,10 +151,10 @@  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'] = config($conn . '.collation', 'utf8mb4_unicode_ci');
157
-        $table['options']['charset'] = config($conn . '.charset', 'utf8mb4');
156
+        $table['options']['collate'] = config($conn.'.collation', 'utf8mb4_unicode_ci');
157
+        $table['options']['charset'] = config($conn.'.charset', 'utf8mb4');
158 158
 
159 159
         $tableName   = $table['name'];
160 160
         $columns     = $table['columns'];
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
         $items           = static::all();
278 278
         $collection      = $items instanceof Collection ? $items : Collection::make($items);
279 279
         if (!empty($query)) {
280
-            $collection = $collection->filter(function ($value, $key) use ($query) {
280
+            $collection = $collection->filter(function($value, $key) use ($query) {
281 281
                 return false !== stristr($value, $query);
282 282
             });
283 283
         }
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/Database/Platforms/Platform.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public static function getPlatform($platformName)
19 19
     {
20
-        $platform = __NAMESPACE__ . '\\' . ucfirst($platformName);
20
+        $platform = __NAMESPACE__.'\\'.ucfirst($platformName);
21 21
 
22 22
         if (!class_exists($platform)) {
23 23
             throw new \Exception("Platform {$platformName} doesn't exist");
Please login to merge, or discard this patch.
src/Manager.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function webRoutes()
31 31
     {
32
-        require __DIR__ . '/../routes/web.php';
32
+        require __DIR__.'/../routes/web.php';
33 33
     }
34 34
     /**
35 35
      * Include API routes
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function apiRoutes()
40 40
     {
41
-        require __DIR__ . '/../routes/api.php';
41
+        require __DIR__.'/../routes/api.php';
42 42
     }
43 43
 
44 44
     /**
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function assets($path)
52 52
     {
53
-        $file = base_path(trim(config('dbm.resources_path'), '/') . "/" . urldecode($path));
53
+        $file = base_path(trim(config('dbm.resources_path'), '/')."/".urldecode($path));
54 54
 
55 55
         if (File::exists($file)) {
56 56
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public function generateModelName($className)
101 101
     {
102
-        return static::getModelNamespace() . '\\' . ucfirst(Str::singular($className));
102
+        return static::getModelNamespace().'\\'.ucfirst(Str::singular($className));
103 103
     }
104 104
     /**
105 105
      * Make new model
@@ -119,27 +119,27 @@  discard block
 block discarded – undo
119 119
             $namespace = implode("\\", $partials);
120 120
 
121 121
             $contents = "<?php\n\n";
122
-            $contents .= "namespace " . $namespace . ";\n\n";
122
+            $contents .= "namespace ".$namespace.";\n\n";
123 123
             if (Driver::isMongoDB()) {
124 124
                 $contents .= "use Jenssegers\Mongodb\Eloquent\Model;\n\n";
125 125
             } else {
126 126
                 $contents .= "use Illuminate\Database\Eloquent\Model;\n\n";
127 127
             }
128
-            $contents .= "class " . $className . " extends Model\n";
128
+            $contents .= "class ".$className." extends Model\n";
129 129
             $contents .= "{\n\n";
130 130
             if (Driver::isMongoDB()) {
131
-                $contents .= "\tprotected \$collection = '" . $table . "';\n";
131
+                $contents .= "\tprotected \$collection = '".$table."';\n";
132 132
             } else {
133
-                $contents .= "\tprotected \$table = '" . $table . "';\n";
133
+                $contents .= "\tprotected \$table = '".$table."';\n";
134 134
             }
135 135
 
136 136
             // $content .= "\tpublic \$timestamps = false;\n";
137 137
             $contents .= "}\n";
138 138
 
139 139
             $filesystem = new Filesystem;
140
-            $filesystem->put(base_path($model . ".php"), $contents);
140
+            $filesystem->put(base_path($model.".php"), $contents);
141 141
         } catch (\Exception $e) {
142
-            throw new \Exception("There has an error when create model. The error is :" . $e->getMessage(), 1);
142
+            throw new \Exception("There has an error when create model. The error is :".$e->getMessage(), 1);
143 143
 
144 144
         }
145 145
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                 'name' => $controller,
159 159
             ]);
160 160
         } catch (\Exception $e) {
161
-            throw new \Exception("There has an error when create Controller. The error is :" . $e->getMessage(), 1);
161
+            throw new \Exception("There has an error when create Controller. The error is :".$e->getMessage(), 1);
162 162
 
163 163
         }
164 164
 
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
             case 'not_authorized':
356 356
                 return response()->json([
357 357
                     'success' => false,
358
-                    'errors'  => ["You don't have permission to " . $slug . " " . $prefix],
358
+                    'errors'  => ["You don't have permission to ".$slug." ".$prefix],
359 359
                 ], 401);
360 360
                 break;
361 361
             case 'authorized':
Please login to merge, or discard this patch.
src/ManagerServiceProvider.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function boot()
31 31
     {
32
-        $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
33
-        $this->loadViewsFrom(__DIR__ . '/../resources/views', 'dbm');
32
+        $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
33
+        $this->loadViewsFrom(__DIR__.'/../resources/views', 'dbm');
34 34
     }
35 35
 
36 36
     /**
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     {
43 43
         $database = $this->app->config['database'];
44 44
         // Bind Dumper to backup and and restore
45
-        $this->app->bind(Dumper::class, function ($app) use ($database) {
45
+        $this->app->bind(Dumper::class, function($app) use ($database) {
46 46
             $connection = $database['default'];
47 47
             $options    = [
48 48
                 "host"     => $database["connections"][$connection]["host"] ?? '',
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         }
88 88
 
89 89
         $this->mergeConfigFrom(
90
-            __DIR__ . '/../config/dbm.php', 'config'
90
+            __DIR__.'/../config/dbm.php', 'config'
91 91
         );
92 92
         $this->loadHelpers();
93 93
         $this->registerPublish();
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      */
102 102
     protected function loadHelpers()
103 103
     {
104
-        foreach (glob(__DIR__ . '/Helpers/*.php') as $filename) {
104
+        foreach (glob(__DIR__.'/Helpers/*.php') as $filename) {
105 105
             require_once $filename;
106 106
         }
107 107
     }
@@ -115,16 +115,16 @@  discard block
 block discarded – undo
115 115
     {
116 116
         $publishable = [
117 117
             'dbm.config'    => [
118
-                __DIR__ . '/../config/dbm.php' => config_path('dbm.php'),
118
+                __DIR__.'/../config/dbm.php' => config_path('dbm.php'),
119 119
             ],
120 120
             'dbm.seeds'     => [
121
-                __DIR__ . "/../database/seeds/" => database_path('seeds'),
121
+                __DIR__."/../database/seeds/" => database_path('seeds'),
122 122
             ],
123 123
             'dbm.views'     => [
124
-                __DIR__ . '/../resources/views' => resource_path('views/vendor/dbm/views'),
124
+                __DIR__.'/../resources/views' => resource_path('views/vendor/dbm/views'),
125 125
             ],
126 126
             'dbm.resources' => [
127
-                __DIR__ . '/../resources' => resource_path('views/vendor/dbm'),
127
+                __DIR__.'/../resources' => resource_path('views/vendor/dbm'),
128 128
             ],
129 129
         ];
130 130
 
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
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
     public static function dateTime($milliseconds = null)
118 118
     {
119 119
         if (!is_int($milliseconds) || !is_float($milliseconds) || !is_string($milliseconds) || !$milliseconds instanceof \DateTimeInterface) {
120
-            throw new \Exception($milliseconds . " integer or float or string or instance of DateTimeInterface");
120
+            throw new \Exception($milliseconds." integer or float or string or instance of DateTimeInterface");
121 121
 
122 122
         }
123 123
         return new UTCDateTime($milliseconds);
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
@@ -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.