Test Setup Failed
Branch development (80c362)
by Ashutosh
14:59
created
app/Http/Controllers/Common/PHPController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
         try {
20 20
             // make a small test
21 21
 
22
-            return function_exists('exec') && ! in_array('exec', array_map('trim', explode(', ', ini_get('disable_functions'))));
22
+            return function_exists('exec') && !in_array('exec', array_map('trim', explode(', ', ini_get('disable_functions'))));
23 23
         } catch (\Exception $ex) {
24 24
             return false;
25 25
         }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         // validate detected / default PHP CLI
50 50
         // Because array_filter() preserves keys, you should consider the resulting array to be an associative array even if the original array had integer keys for there may be holes in your sequence of keys. This means that, for example, json_encode() will convert your result array into an object instead of an array. Call array_values() on the result array to guarantee json_encode() gives you an array.
51 51
 
52
-        $paths = array_values(array_filter($paths, function ($path) {
52
+        $paths = array_values(array_filter($paths, function($path) {
53 53
             try {
54 54
                 return is_executable($path) && preg_match("/php[0-9\.a-z]{0,3}$/i", $path);
55 55
             } catch (\Exception $e) {
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         try {
67 67
             $path = $request->get('path');
68 68
             $version = '7.2';
69
-            if (! file_exists($path) || ! is_executable($path)) {
69
+            if (!file_exists($path) || !is_executable($path)) {
70 70
                 return errorResponse(\Lang::get('message.invalid-php-path'));
71 71
             }
72 72
 
Please login to merge, or discard this patch.
app/Http/Controllers/Common/PaymentSettingsController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 
73 73
                             return $action;
74 74
                         })
75
-                      ->rawColumns(['name', 'description', 'author', 'website', 'version', 'action'])
75
+                        ->rawColumns(['name', 'description', 'author', 'website', 'version', 'action'])
76 76
                             ->make(true);
77 77
     }
78 78
 
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,22 +15,22 @@  discard block
 block discarded – undo
15 15
 
16 16
         return \DataTables::of(new Collection($plugins))
17 17
                         // ->searchColumns('name')
18
-                        ->addColumn('name', function ($model) {
18
+                        ->addColumn('name', function($model) {
19 19
                             return ucfirst($model['name']);
20 20
                         })
21
-                        ->addColumn('description', function ($model) {
21
+                        ->addColumn('description', function($model) {
22 22
                             return $model['description'];
23 23
                         })
24
-                        ->addColumn('author', function ($model) {
24
+                        ->addColumn('author', function($model) {
25 25
                             return ucfirst($model['author']);
26 26
                         })
27
-                        ->addColumn('website', function ($model) {
27
+                        ->addColumn('website', function($model) {
28 28
                             return '<a href='.$model['website'].' target=_blank>'.$model['website'].'</a>';
29 29
                         })
30
-                        ->addColumn('version', function ($model) {
30
+                        ->addColumn('version', function($model) {
31 31
                             return $model['version'];
32 32
                         })
33
-                        ->addColumn('action', function ($model) {
33
+                        ->addColumn('action', function($model) {
34 34
                             if (array_has($model, 'path')) {
35 35
                                 if ($model['status'] == 0) {
36 36
                                     $activate = '<form method="post" action='.url('plugin/status/'.$model['name']).'>'.'<input type="hidden" name="_token" value='.\Session::token().'>'.'
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
     {
159 159
         $plugs = new Plugin();
160 160
         $plug = $plugs->where('name', $slug)->first();
161
-        if (! $plug) {
161
+        if (!$plug) {
162 162
             $app = base_path().DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'app.php';
163 163
             $str = "\n'App\\Plugins\\$slug"."\\ServiceProvider',";
164 164
             $line_i_am_looking_for = 102;
@@ -277,10 +277,10 @@  discard block
 block discarded – undo
277 277
      */
278 278
     public function deleteDirectory($dir)
279 279
     {
280
-        if (! file_exists($dir)) {
280
+        if (!file_exists($dir)) {
281 281
             return true;
282 282
         }
283
-        if (! is_dir($dir)) {
283
+        if (!is_dir($dir)) {
284 284
             return unlink($dir);
285 285
         }
286 286
         foreach (scandir($dir) as $item) {
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
                 continue;
289 289
             }
290 290
             chmod($dir.DIRECTORY_SEPARATOR.$item, 0777);
291
-            if (! $this->deleteDirectory($dir.DIRECTORY_SEPARATOR.$item)) {
291
+            if (!$this->deleteDirectory($dir.DIRECTORY_SEPARATOR.$item)) {
292 292
                 return false;
293 293
             }
294 294
         }
Please login to merge, or discard this patch.
app/Http/Controllers/Common/TemplateController.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
                             value=".$model->id.' name=select[] id=check>';
91 91
                         })
92 92
 
93
-                         ->addColumn('name', function ($model) {
94
-                             return $model->name;
95
-                         })
93
+                            ->addColumn('name', function ($model) {
94
+                                return $model->name;
95
+                            })
96 96
                         ->addColumn('type', function ($model) {
97 97
                             return $this->type->where('id', $model->type)->first()->name;
98 98
                         })
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
     }
237 237
 
238 238
     public function mailing($from, $to, $data, $subject, $replace = [],
239
-     $type = '', $bcc = [], $fromname = '', $toname = '', $cc = [], $attach = [])
239
+        $type = '', $bcc = [], $fromname = '', $toname = '', $cc = [], $attach = [])
240 240
     {
241 241
         try {
242 242
             $transform = [];
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -85,18 +85,18 @@  discard block
 block discarded – undo
85 85
     public function getTemplates()
86 86
     {
87 87
         return \DataTables::of($this->template->select('id', 'name', 'type')->get())
88
-                        ->addColumn('checkbox', function ($model) {
88
+                        ->addColumn('checkbox', function($model) {
89 89
                             return "<input type='checkbox' class='template_checkbox' 
90 90
                             value=".$model->id.' name=select[] id=check>';
91 91
                         })
92 92
 
93
-                         ->addColumn('name', function ($model) {
93
+                         ->addColumn('name', function($model) {
94 94
                              return $model->name;
95 95
                          })
96
-                        ->addColumn('type', function ($model) {
96
+                        ->addColumn('type', function($model) {
97 97
                             return $this->type->where('id', $model->type)->first()->name;
98 98
                         })
99
-                        ->addColumn('action', function ($model) {
99
+                        ->addColumn('action', function($model) {
100 100
                             return '<a href='.url('templates/'.$model->id.'/edit').
101 101
                             " class='btn btn-sm btn-secondary btn-xs'".tooltip('Edit')."<i class='fa fa-edit'
102 102
                                  style='color:white;'> </i></a>";
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     {
193 193
         try {
194 194
             $ids = $request->input('select');
195
-            if (! empty($ids)) {
195
+            if (!empty($ids)) {
196 196
                 foreach ($ids as $id) {
197 197
                     $template = $this->template->where('id', $id)->first();
198 198
                     if ($template) {
@@ -245,26 +245,26 @@  discard block
 block discarded – undo
245 245
             $data = $page_controller->transform($type, $data, $transform);
246 246
             $settings = \App\Model\Common\Setting::find(1);
247 247
             $fromname = $settings->company;
248
-            \Mail::send('emails.mail', ['data' => $data], function ($m) use ($from, $to, $subject, $fromname, $toname, $cc, $attach, $bcc) {
248
+            \Mail::send('emails.mail', ['data' => $data], function($m) use ($from, $to, $subject, $fromname, $toname, $cc, $attach, $bcc) {
249 249
                 $m->from($from, $fromname);
250 250
 
251 251
                 $m->to($to, $toname)->subject($subject);
252 252
 
253 253
                 /* if cc is need  */
254
-                if (! empty($cc)) {
254
+                if (!empty($cc)) {
255 255
                     foreach ($cc as $address) {
256 256
                         $m->cc($address['address'], $address['name']);
257 257
                     }
258 258
                 }
259 259
 
260
-                if (! empty($bcc)) {
260
+                if (!empty($bcc)) {
261 261
                     foreach ($bcc as $address) {
262 262
                         $m->bcc($address);
263 263
                     }
264 264
                 }
265 265
 
266 266
                 /*  if attachment is need */
267
-                if (! empty($attach)) {
267
+                if (!empty($attach)) {
268 268
                     foreach ($attach as $file) {
269 269
                         $m->attach($file['path'], $options = []);
270 270
                     }
Please login to merge, or discard this patch.
app/Http/Controllers/Common/BaseTemplateController.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,8 @@
 block discarded – undo
25 25
             $currencyAndSymbol = userCurrency();
26 26
             $currency = $currencyAndSymbol['currency'];
27 27
             $symbol = $currencyAndSymbol['symbol'];
28
-            if ($symbol == '') {  //If user has no currency symbol(In case of old customers)
28
+            if ($symbol == '') {
29
+//If user has no currency symbol(In case of old customers)
29 30
                 $symbol = Currency::where('code', $currency)->pluck('symbol')->first();
30 31
                 $symbol = \Auth::user()->update(['currency_symbol'=> $symbol]);
31 32
             }
Please login to merge, or discard this patch.
app/Http/Controllers/Common/SystemManagerController.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@
 block discarded – undo
36 36
                 return \Response::json([]);
37 37
             }
38 38
             $users = User::where('email', 'LIKE', '%'.$term.'%')
39
-             ->orWhere('first_name', 'LIKE', '%'.$term.'%')
40
-             ->orWhere('last_name', 'LIKE', '%'.$term.'%')
41
-             ->select('id', 'email', 'profile_pic', 'first_name', 'last_name', 'role')->get();
39
+                ->orWhere('first_name', 'LIKE', '%'.$term.'%')
40
+                ->orWhere('last_name', 'LIKE', '%'.$term.'%')
41
+                ->select('id', 'email', 'profile_pic', 'first_name', 'last_name', 'role')->get();
42 42
             $formatted_tags = [];
43 43
 
44 44
             foreach ($users as $user) {
Please login to merge, or discard this patch.
app/Http/Controllers/Common/BaseSettingsController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     {
67 67
         try {
68 68
             $ids = $request->input('select');
69
-            if (! empty($ids)) {
69
+            if (!empty($ids)) {
70 70
                 foreach ($ids as $id) {
71 71
                     $email = \DB::table('email_log')->where('id', $id)->delete();
72 72
                     if ($email) {
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
                     $oldLine = substr($str, $keyPosition, $endOfLinePosition - $keyPosition);
279 279
 
280 280
                     // If key does not exist, add it
281
-                    if (! $keyPosition || ! $endOfLinePosition || ! $oldLine) {
281
+                    if (!$keyPosition || !$endOfLinePosition || !$oldLine) {
282 282
                         $str .= "{$envKey}={$envValue}\n";
283 283
                     } else {
284 284
                         $str = str_replace($oldLine, "{$envKey}={$envValue}", $str);
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
             }
288 288
 
289 289
             $str = substr($str, 0, -1);
290
-            if (! file_put_contents($envFile, $str)) {
290
+            if (!file_put_contents($envFile, $str)) {
291 291
                 return false;
292 292
             }
293 293
         } else {
Please login to merge, or discard this patch.
app/Http/Controllers/Common/Twitter/TwitterOAuth.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
         $this->resetLastResponse();
46 46
         $this->signatureMethod = new HmacSha1();
47 47
         $this->consumer = new Consumer($consumerKey, $consumerSecret);
48
-        if (! empty($oauthToken) && ! empty($oauthTokenSecret)) {
48
+        if (!empty($oauthToken) && !empty($oauthTokenSecret)) {
49 49
             $this->token = new Token($oauthToken, $oauthTokenSecret);
50 50
         }
51
-        if (empty($oauthToken) && ! empty($oauthTokenSecret)) {
51
+        if (empty($oauthToken) && !empty($oauthTokenSecret)) {
52 52
             $this->bearer = $oauthTokenSecret;
53 53
         }
54 54
     }
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
         // Append
277 277
         $segment_index = 0;
278 278
         $media = fopen($parameters['media'], 'rb');
279
-        while (! feof($media)) {
279
+        while (!feof($media)) {
280 280
             $this->http('POST', self::UPLOAD_HOST, 'media/upload', [
281 281
                 'command'       => 'APPEND',
282 282
                 'media_id'      => $init->media_id_string,
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
             $options[CURLOPT_ENCODING] = 'gzip';
376 376
         }
377 377
 
378
-        if (! empty($this->proxy)) {
378
+        if (!empty($this->proxy)) {
379 379
             $options[CURLOPT_PROXY] = $this->proxy['CURLOPT_PROXY'];
380 380
             $options[CURLOPT_PROXYUSERPWD] = $this->proxy['CURLOPT_PROXYUSERPWD'];
381 381
             $options[CURLOPT_PROXYPORT] = $this->proxy['CURLOPT_PROXYPORT'];
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
                 break;
399 399
         }
400 400
 
401
-        if (in_array($method, ['GET', 'PUT', 'DELETE']) && ! empty($postfields)) {
401
+        if (in_array($method, ['GET', 'PUT', 'DELETE']) && !empty($postfields)) {
402 402
             $options[CURLOPT_URL] .= '?'.Util::buildHttpQuery($postfields);
403 403
         }
404 404
 
Please login to merge, or discard this patch.
app/Http/Controllers/Common/Twitter/Util/JsonDecoder.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 decode($string, $asArray)
19 19
     {
20
-        if (version_compare(PHP_VERSION, '5.4.0', '>=') && ! (defined('JSON_C_VERSION') && PHP_INT_SIZE > 4)) {
20
+        if (version_compare(PHP_VERSION, '5.4.0', '>=') && !(defined('JSON_C_VERSION') && PHP_INT_SIZE > 4)) {
21 21
             return json_decode($string, $asArray, 512, JSON_BIGINT_AS_STRING);
22 22
         }
23 23
 
Please login to merge, or discard this patch.
app/Http/Controllers/Common/Twitter/Util.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
      */
47 47
     public static function parseParameters($input)
48 48
     {
49
-        if (! isset($input) || ! $input) {
49
+        if (!isset($input) || !$input) {
50 50
             return [];
51 51
         }
52 52
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public static function buildHttpQuery($params)
86 86
     {
87
-        if (! $params) {
87
+        if (!$params) {
88 88
             return '';
89 89
         }
90 90
 
Please login to merge, or discard this patch.