Passed
Pull Request — master (#1110)
by Iman
04:57
created
src/helpers/DbInspector.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      */
17 17
     public static function findPK($table)
18 18
     {
19
-        if (! $table) {
19
+        if (!$table) {
20 20
             return 'id';
21 21
         }
22 22
 
@@ -25,13 +25,13 @@  discard block
 block discarded – undo
25 25
         }
26 26
         $table = CRUDBooster::parseSqlTable($table);
27 27
 
28
-        if (! $table['table']) {
28
+        if (!$table['table']) {
29 29
             throw new \Exception("parseSqlTable can't determine the table");
30 30
         }
31 31
 
32 32
         $primary_key = self::findPKname($table);
33 33
 
34
-        if (! $primary_key) {
34
+        if (!$primary_key) {
35 35
             return 'id';
36 36
         }
37 37
         CbCache::put('table_'.$table, 'primary_key', $primary_key);
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         $cols = collect(DB::select('SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = :database AND TABLE_NAME = :table', [
102 102
             'database' => $table['database'],
103 103
             'table' => $table['table'],
104
-        ]))->map(function ($x) {
104
+        ]))->map(function($x) {
105 105
             return (array) $x;
106 106
         })->toArray();
107 107
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     {
118 118
         $field = 'field_type_'.$table.'_'.$field;
119 119
 
120
-        return Cache::rememberForever($field, function () use ($table, $field) {
120
+        return Cache::rememberForever($field, function() use ($table, $field) {
121 121
             try {
122 122
                 //MySQL & SQL Server
123 123
                 $typedata = DB::select(DB::raw("select DATA_TYPE from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='$table' and COLUMN_NAME = '$field'"))[0]->DATA_TYPE;
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
         }
143 143
 
144 144
         $table = CRUDBooster::getTableForeignKey($fieldName);
145
-        if (! $table) {
145
+        if (!$table) {
146 146
             return false;
147 147
         }
148 148
 
Please login to merge, or discard this patch.
src/Modules/ModuleGenerator/ControllerGenerator/FormConfigGenerator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -132,8 +132,8 @@
 block discarded – undo
132 132
         $default = ["text", "min:1|max:255", []];
133 133
         return array_get([
134 134
             'text' => ['textarea', "string|min:5", []],
135
-            'date' => ['date', "date", ['php_format' => 'M, d Y', 'datepicker_format' => 'M, dd YYYY',]],
136
-            'datetime' => ['datetime', "date_format:Y-m-d H:i:s", ['php_format' => 'M, d Y H:i',]],
135
+            'date' => ['date', "date", ['php_format' => 'M, d Y', 'datepicker_format' => 'M, dd YYYY', ]],
136
+            'datetime' => ['datetime', "date_format:Y-m-d H:i:s", ['php_format' => 'M, d Y H:i', ]],
137 137
             'time' => ['time', 'date_format:H:i:s', []],
138 138
             'double' => ['money', "integer|min:0", []],
139 139
             'int' => ['number', 'integer|min:0', []],
Please login to merge, or discard this patch.
src/Modules/EmailTemplates/CbEmailTemplatesServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     public function boot()
15 15
     {
16 16
         $this->app['view']->addNamespace('CbEmailTpl', __DIR__.'/views');
17
-        $this->loadRoutesFrom( __DIR__.'/email_templates_routes.php');
17
+        $this->loadRoutesFrom(__DIR__.'/email_templates_routes.php');
18 18
     }
19 19
 
20 20
     /**
Please login to merge, or discard this patch.
src/commands/RequirementChecker.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
     private function chechExtension($extension)
78 78
     {
79
-        if (! extension_loaded($extension)) {
79
+        if (!extension_loaded($extension)) {
80 80
             $this->console->info($extension.' extension: [Bad]');
81 81
             return $this->requirements = false;
82 82
         }
Please login to merge, or discard this patch.
src/Modules/ModuleGenerator/FileManipulator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@
 block discarded – undo
229 229
 
230 230
     public static function stringify($input, $indent = "")
231 231
     {
232
-        if (! is_array($input)) {
232
+        if (!is_array($input)) {
233 233
             return var_export($input, true);
234 234
         }
235 235
         $buffer = [];
Please login to merge, or discard this patch.
src/Modules/ModuleGenerator/ScaffoldingParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@
 block discarded – undo
9 9
         $colsItem = self::extractLines($code, $type);
10 10
 
11 11
         foreach ($colsItem as &$item) {
12
-            $item = str_replace(' ','', $item);
13
-            $item = str_replace('\',]',']', $item);
12
+            $item = str_replace(' ', '', $item);
13
+            $item = str_replace('\',]', ']', $item);
14 14
             $item = trim($item);
15 15
             $item = trim($item, '[');
16 16
             $item = trim($item, '];');
Please login to merge, or discard this patch.
src/Modules/ModuleGenerator/Step2Handler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         $columnScript[] = '            $this->col[] = [];';
62 62
         foreach ($labels as $i => $label) {
63 63
 
64
-            if (! $name[$i]) {
64
+            if (!$name[$i]) {
65 65
                 continue;
66 66
             }
67 67
 
Please login to merge, or discard this patch.
src/helpers/CRUDBooster.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     public static function first($table, $id)
154 154
     {
155 155
         $table = self::parseSqlTable($table)['table'];
156
-        if (! is_array($id)) {
156
+        if (!is_array($id)) {
157 157
             $pk = self::pk($table);
158 158
 
159 159
             return DB::table($table)->where($pk, $id)->first();
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
         $controllerName = basename($controllerName);
248 248
         $route_url = route($controllerName.'GetIndex');
249 249
 
250
-        if (! $path) {
250
+        if (!$path) {
251 251
             return trim($route_url, '/');
252 252
         }
253 253
 
Please login to merge, or discard this patch.
src/CBCoreModule/ViewHelpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
         @$get = $_GET;
10 10
         $inputhtml = '';
11 11
 
12
-        if (! $get) {
12
+        if (!$get) {
13 13
             return $inputhtml;
14 14
         }
15 15
         if (is_array($exception)) {
Please login to merge, or discard this patch.