@@ -14,7 +14,7 @@ |
||
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 | /** |
@@ -76,7 +76,7 @@ |
||
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 | } |
@@ -229,7 +229,7 @@ |
||
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 = []; |
@@ -9,8 +9,8 @@ |
||
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, '];'); |
@@ -61,7 +61,7 @@ |
||
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 |
@@ -153,7 +153,7 @@ discard block |
||
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 |
||
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 |
@@ -9,7 +9,7 @@ |
||
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)) { |
@@ -53,11 +53,11 @@ discard block |
||
53 | 53 | | ---------------------------------------------- |
54 | 54 | | |
55 | 55 | */ |
56 | - if (! $row_api->method_type) { |
|
56 | + if (!$row_api->method_type) { |
|
57 | 57 | return; |
58 | 58 | } |
59 | 59 | $method_type = $row_api->method_type; |
60 | - if ($method_type && ! Request::isMethod($method_type)) { |
|
60 | + if ($method_type && !Request::isMethod($method_type)) { |
|
61 | 61 | $result['api_status'] = 0; |
62 | 62 | $result['api_message'] = "The request method is not allowed !"; |
63 | 63 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | | ---------------------------------------------- |
71 | 71 | | |
72 | 72 | */ |
73 | - if (! $row_api) { |
|
73 | + if (!$row_api) { |
|
74 | 74 | $result['api_status'] = 0; |
75 | 75 | $result['api_message'] = 'Sorry this API is no longer available, maybe has changed by admin, or please make sure api url is correct.'; |
76 | 76 | |
@@ -173,11 +173,11 @@ discard block |
||
173 | 173 | $value = $param['config']; |
174 | 174 | } |
175 | 175 | |
176 | - if ($required && $type == 'password' && ! Hash::check($value, $rows->{$name})) { |
|
176 | + if ($required && $type == 'password' && !Hash::check($value, $rows->{$name})) { |
|
177 | 177 | return $this->passwordError($result, $debug_mode_message, $posts); |
178 | 178 | } |
179 | 179 | |
180 | - if (! $required && $used && $value && ! Hash::check($value, $row->{$name})) { |
|
180 | + if (!$required && $used && $value && !Hash::check($value, $row->{$name})) { |
|
181 | 181 | return $this->passwordError($result, $debug_mode_message, $posts); |
182 | 182 | } |
183 | 183 | } |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | */ |
305 | 305 | private function filterRows($data, $parameters, $posts, $table, $type_except) |
306 | 306 | { |
307 | - $data->where(function ($w) use ($parameters, $posts, $table, $type_except) { |
|
307 | + $data->where(function($w) use ($parameters, $posts, $table, $type_except) { |
|
308 | 308 | foreach ($parameters as $param) { |
309 | 309 | $name = $param['name']; |
310 | 310 | $type = $param['type']; |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | $row->$k = asset($v); |
397 | 397 | } |
398 | 398 | |
399 | - if (! in_array($k, $responses_fields)) { |
|
399 | + if (!in_array($k, $responses_fields)) { |
|
400 | 400 | unset($row[$k]); |
401 | 401 | } |
402 | 402 | } |
@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | $rows->$k = asset($v); |
460 | 460 | } |
461 | 461 | |
462 | - if (! in_array($k, $responses_fields)) { |
|
462 | + if (!in_array($k, $responses_fields)) { |
|
463 | 463 | unset($row[$k]); |
464 | 464 | } |
465 | 465 | } |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | $subquery = $resp['subquery']; |
482 | 482 | $used = intval($resp['used']); |
483 | 483 | |
484 | - if ($used == 0 && ! DbInspector::isForeignKey($name)) { |
|
484 | + if ($used == 0 && !DbInspector::isForeignKey($name)) { |
|
485 | 485 | continue; |
486 | 486 | } |
487 | 487 | |
@@ -536,7 +536,7 @@ discard block |
||
536 | 536 | */ |
537 | 537 | private function applyLike($data, $search_in, $value) |
538 | 538 | { |
539 | - $data->where(function ($w) use ($search_in, $value) { |
|
539 | + $data->where(function($w) use ($search_in, $value) { |
|
540 | 540 | foreach ($search_in as $k => $field) { |
541 | 541 | if ($k == 0) { |
542 | 542 | $w->where($field, "like", "%$value%"); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | function uploadImportData($file) |
51 | 51 | { |
52 | 52 | $dir = 'uploads/'.date('Y-m'); |
53 | - $filename = md5(str_random(5)).'.'. $file->getClientOriginalExtension(); |
|
53 | + $filename = md5(str_random(5)).'.'.$file->getClientOriginalExtension(); |
|
54 | 54 | |
55 | 55 | //Create Directory Monthly |
56 | 56 | Storage::makeDirectory($dir); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | function validateForImport($file) |
69 | 69 | { |
70 | - return Validator::make(['extension' => $file->getClientOriginalExtension(),], ['extension' => 'in:xls,xlsx,csv']); |
|
70 | + return Validator::make(['extension' => $file->getClientOriginalExtension(), ], ['extension' => 'in:xls,xlsx,csv']); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | $file = base64_decode(request('file')); |
85 | 85 | $file = 'storage'.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.$file; |
86 | - $rows = Excel::load($file, function ($reader) { |
|
86 | + $rows = Excel::load($file, function($reader) { |
|
87 | 87 | })->get(); |
88 | 88 | |
89 | 89 | //$data_import_column = []; |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | foreach ($select_column as $sk => $s) { |
129 | 129 | $colname = $table_columns[$sk]; |
130 | 130 | |
131 | - if (! DbInspector::isForeignKey($colname) || intval($value->$s)) { |
|
131 | + if (!DbInspector::isForeignKey($colname) || intval($value->$s)) { |
|
132 | 132 | $a[$colname] = $value->$s; |
133 | 133 | continue; |
134 | 134 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | $relation_moduls = DB::table('cms_moduls')->where('table_name', $relation_table)->first(); |
143 | 143 | |
144 | 144 | $relation_class = __NAMESPACE__.'\\'.$relation_moduls->controller; |
145 | - if (! class_exists($relation_class)) { |
|
145 | + if (!class_exists($relation_class)) { |
|
146 | 146 | $relation_class = '\App\Http\Controllers\\'.$relation_moduls->controller; |
147 | 147 | } |
148 | 148 | $relation_class = new $relation_class; |