Passed
Push — master ( 0393a1...3388c8 )
by Iman
06:45 queued 02:48
created
src/helpers/cb_helpers.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -8,28 +8,28 @@  discard block
 block discarded – undo
8 8
 | ---------------------------------------------------------------------------------------------------------------
9 9
 |
10 10
 */
11
-if (! function_exists('cbModulesNS')) {
11
+if (!function_exists('cbModulesNS')) {
12 12
     function cbModulesNS($path = '')
13 13
     {
14 14
         return '\crocodicstudio\crudbooster\Modules\\'.$path;
15 15
     }
16 16
 }
17 17
 
18
-if (! function_exists('cbAdminPath')) {
18
+if (!function_exists('cbAdminPath')) {
19 19
     function cbAdminPath()
20 20
     {
21 21
         return cbConfig('ADMIN_PATH');
22 22
     }
23 23
 }
24 24
 
25
-if (! function_exists('ctrlNamespace')) {
25
+if (!function_exists('ctrlNamespace')) {
26 26
     function ctrlNamespace()
27 27
     {
28 28
         return 'App\Http\Controllers';
29 29
     }
30 30
 }
31 31
 
32
-if (! function_exists('is_checked')) {
32
+if (!function_exists('is_checked')) {
33 33
     /**
34 34
      * @param $format
35 35
      * @param $value
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     }
54 54
 }
55 55
 
56
-if (! function_exists('controllers_dir')) {
56
+if (!function_exists('controllers_dir')) {
57 57
     function controllers_dir()
58 58
     {
59 59
         $_ = DIRECTORY_SEPARATOR;
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     }
62 62
 }
63 63
 
64
-if (! function_exists('controller_path')) {
64
+if (!function_exists('controller_path')) {
65 65
     function controller_path($controller)
66 66
     {
67 67
         $_ = DIRECTORY_SEPARATOR;
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     }
70 70
 }
71 71
 
72
-if (! function_exists('extract_unit')) {
72
+if (!function_exists('extract_unit')) {
73 73
     /*
74 74
     Credits: Bit Repository
75 75
     URL: http://www.bitrepository.com/extract-content-between-two-delimiters-with-php.html
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     }
88 88
 }
89 89
 
90
-if (! function_exists('now')) {
90
+if (!function_exists('now')) {
91 91
     function now()
92 92
     {
93 93
         return date('Y-m-d H:i:s');
@@ -101,17 +101,17 @@  discard block
 block discarded – undo
101 101
 | $name = name of input
102 102
 |
103 103
 */
104
-if (! function_exists('g')) {
104
+if (!function_exists('g')) {
105 105
     function g($name)
106 106
     {
107 107
         return Request::get($name);
108 108
     }
109 109
 }
110 110
 
111
-if (! function_exists('min_var_export')) {
111
+if (!function_exists('min_var_export')) {
112 112
     function min_var_export($input, $indent = "")
113 113
     {
114
-        if (! is_array($input)) {
114
+        if (!is_array($input)) {
115 115
             return var_export($input, true);
116 116
         }
117 117
         $buffer = [];
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     }
127 127
 }
128 128
 
129
-if (! function_exists('cbTrans')) {
129
+if (!function_exists('cbTrans')) {
130 130
     /**
131 131
      * Translate the given message.
132 132
      *
@@ -140,34 +140,34 @@  discard block
 block discarded – undo
140 140
     }
141 141
 }
142 142
 
143
-if (! function_exists('cbAsset')) {
143
+if (!function_exists('cbAsset')) {
144 144
     function cbAsset($key)
145 145
     {
146 146
         return asset('vendor/crudbooster/assets/'.$key);
147 147
     }
148 148
 }
149 149
 
150
-if (! function_exists('cbScript')) {
150
+if (!function_exists('cbScript')) {
151 151
     function cbScript($key)
152 152
     {
153 153
         return '<script src="'.cbAsset($key).'" type="text/javascript"></script>';
154 154
     }
155 155
 }
156 156
 
157
-if (! function_exists('cbStyleSheet')) {
157
+if (!function_exists('cbStyleSheet')) {
158 158
     function cbStyleSheet($key)
159 159
     {
160 160
         return '<link rel="stylesheet" type="text/css" href="'.cbAsset($key).'"/>';
161 161
     }
162 162
 }
163 163
 
164
-if (! function_exists('cbConfig')) {
164
+if (!function_exists('cbConfig')) {
165 165
     function cbConfig($key, $default = null)
166 166
     {
167 167
         return config('crudbooster.'.$key, $default);
168 168
     }
169 169
 }
170
-if (! function_exists('makeValidationForHTML')) {
170
+if (!function_exists('makeValidationForHTML')) {
171 171
     function makeValidationForHTML($rules)
172 172
     {
173 173
         $validation = [];
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
     }
186 186
 }
187 187
 
188
-if (! function_exists('findSelected')) {
188
+if (!function_exists('findSelected')) {
189 189
     /**
190 190
      * @param $rawvalue
191 191
      * @param $form
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
      */
195 195
     function findSelected($rawvalue, $form, $optionValue)
196 196
     {
197
-        if (! $rawvalue) {
197
+        if (!$rawvalue) {
198 198
             return '';
199 199
         }
200 200
         $value = $rawvalue;
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         return $selected;
217 217
     }
218 218
 }
219
-if (! function_exists('array_get_keys')) {
219
+if (!function_exists('array_get_keys')) {
220 220
 
221 221
     /**
222 222
      * @param array $_array
@@ -232,24 +232,24 @@  discard block
 block discarded – undo
232 232
     }
233 233
 }
234 234
 
235
-if (! function_exists('cbGetSetting')) {
235
+if (!function_exists('cbGetSetting')) {
236 236
     function cbGetSetting($name)
237 237
     {
238 238
         return \crocodicstudio\crudbooster\Modules\SettingModule\SettingRepo::getSetting($name);
239 239
     }
240 240
 }
241 241
 
242
-if (! function_exists('backWithMsg')) {
242
+if (!function_exists('backWithMsg')) {
243 243
     function backWithMsg($msg, $type = 'success')
244 244
     {
245 245
         sendAndTerminate(redirect()->back()->with(['message_type' => $type, 'message' => $msg]));
246 246
     }
247 247
 }
248 248
 
249
-if (! function_exists('underField')) {
249
+if (!function_exists('underField')) {
250 250
     function underField($help, $error)
251 251
     {
252
-        $error = $error ? "<i class='fa fa-info-circle'></i> $error":'' ;
252
+        $error = $error ? "<i class='fa fa-info-circle'></i> $error" : '';
253 253
         return "<div class='text-danger'>$error</div><p class='help-block'>$help</p>";
254 254
     }
255 255
 }
Please login to merge, or discard this patch.
src/commands/CrudboosterInstallationCommand.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $printer->printHeader();
40 40
 
41 41
         $passes = (new RequirementChecker($this))->check();
42
-        if(!$passes) {
42
+        if (!$passes) {
43 43
             $this->info('Sorry unfortunately your system is not meet with our requirements !');
44 44
             $printer->printFooter(false);
45 45
             $this->info('--');
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
         $this->symlinkForAsset();
61 61
       
62 62
 
63
-		if($this->confirm('Do you have setting the database configuration at .env ?')) {
63
+		if ($this->confirm('Do you have setting the database configuration at .env ?')) {
64 64
             $this->installCrudbooster();
65
-		}else{
65
+		} else {
66 66
 			$this->info('Setup Aborted !');
67 67
 			$this->info('Please setting the database configuration for first !');
68 68
 		}
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         if (!file_exists($vendorPath)) {
113 113
             $this->info('Creating public/vendor/crudbooster symlink...');
114 114
             app('files')->link(__DIR__.'/../assets', public_path('vendor/crudbooster'));
115
-            return ;
115
+            return;
116 116
         }
117 117
 
118 118
         $this->info('Vendor Path: '.$vendorPath);
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         $this->info('Migrating database...');
148 148
         $this->call('migrate', ['--path'=> '\database\migrations\crudbooster']);
149 149
 
150
-        if (! class_exists('CBSeeder')) {
150
+        if (!class_exists('CBSeeder')) {
151 151
             require_once __DIR__.'/../database/seeds/CBSeeder.php';
152 152
         }
153 153
         $this->callSilent('db:seed', ['--class' => 'CBSeeder']);
@@ -160,11 +160,11 @@  discard block
 block discarded – undo
160 160
     private function createVendorAtPublic()
161 161
     {
162 162
         $this->info('Checking public/vendor directory...');
163
-        if (! file_exists(public_path('vendor'))) {
163
+        if (!file_exists(public_path('vendor'))) {
164 164
             mkdir(public_path('vendor'), 0777);
165 165
         }
166 166
 
167
-        if (! is_writable(public_path('vendor'))) {
167
+        if (!is_writable(public_path('vendor'))) {
168 168
             $this->info('Setup aborted !');
169 169
             $this->info('Please set public/vendor directory to writable 0777');
170 170
             exit;
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
     */
176 176
     private function rrmdir($dir)
177 177
     {
178
-        if (! is_dir($dir)) {
178
+        if (!is_dir($dir)) {
179 179
             return;
180 180
         }
181 181
         foreach (scandir($dir) as $object) {
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.