Completed
Push — master ( 16b3da...b2b678 )
by Jan
38s
created
app/Usergroup.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,14 +33,14 @@  discard block
 block discarded – undo
33 33
      *
34 34
      * @var array
35 35
      */
36
-    protected $dates = ['created_at', 'updated_at', 'deleted_at'];
36
+    protected $dates = [ 'created_at', 'updated_at', 'deleted_at' ];
37 37
     
38 38
     /**
39 39
      * The attributes that are mass assignable.
40 40
      *
41 41
      * @var array
42 42
      */
43
-    protected $fillable = ['name'];
43
+    protected $fillable = [ 'name' ];
44 44
 
45 45
     /**
46 46
      * Fields to search in fulltext mode
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      * 
71 71
      * @return object
72 72
      */
73
-    public function users(){
73
+    public function users() {
74 74
         
75 75
         return $this->hasMany('App\User', 'usergroup_id');
76 76
     }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      * @param query $query
82 82
      * @return query
83 83
      */
84
-    public function scopeRelationships($query){
84
+    public function scopeRelationships($query) {
85 85
         
86 86
         return $query->with('users');
87 87
     }
Please login to merge, or discard this patch.
app/Image.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -34,28 +34,28 @@  discard block
 block discarded – undo
34 34
      *
35 35
      * @var array
36 36
      */
37
-    protected $dates = ['created_at', 'updated_at', 'deleted_at'];
37
+    protected $dates = [ 'created_at', 'updated_at', 'deleted_at' ];
38 38
     
39 39
     /**
40 40
      * The attributes that are mass assignable.
41 41
      *
42 42
      * @var array
43 43
      */
44
-    protected $fillable = ['name', 'description', 'alt', 'url'];
44
+    protected $fillable = [ 'name', 'description', 'alt', 'url' ];
45 45
     
46 46
     /**
47 47
      * Columns to exclude from index
48 48
      * 
49 49
      * @var array 
50 50
      */
51
-    protected $excludedFromIndex = [];
51
+    protected $excludedFromIndex = [ ];
52 52
     
53 53
     /**
54 54
      * Hidden from custom find
55 55
      * 
56 56
      * @var arrat 
57 57
      */
58
-    protected  $excludedFromFind = [];
58
+    protected  $excludedFromFind = [ ];
59 59
     
60 60
     /**
61 61
      * Fields to search in fulltext mode
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      * 
101 101
      * @return object
102 102
      */
103
-    public function imagecategories(){
103
+    public function imagecategories() {
104 104
         
105 105
         return $this->belongsTo('App\ImageCategory', 'imagecategory_id');
106 106
     }
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      * 
111 111
      * @return object
112 112
      */
113
-    public function slides(){
113
+    public function slides() {
114 114
         
115 115
         return $this->hasMany('App\Slide', 'image_id');
116 116
     }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      * 
121 121
      * @return object
122 122
      */
123
-    public function articlecategories(){
123
+    public function articlecategories() {
124 124
         
125 125
         return $this->hasMany('App\ArticleCategory', 'image_id');
126 126
     }
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
      * 
131 131
      * @return object
132 132
      */
133
-    public function pages(){
133
+    public function pages() {
134 134
         
135 135
         return $this->hasMany('App\Page', 'image_id');
136 136
     }
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
      * @param query $query
142 142
      * @return query
143 143
      */
144
-    public function scopeRelationships($query){
144
+    public function scopeRelationships($query) {
145 145
         
146 146
         return $query->with('imagecategories');
147 147
     }
@@ -151,8 +151,8 @@  discard block
 block discarded – undo
151 151
      * 
152 152
      * @param array $array
153 153
      */
154
-    public function hide($array = []){
154
+    public function hide($array = [ ]) {
155 155
         
156
-        $this->hidden = ['image'];
156
+        $this->hidden = [ 'image' ];
157 157
     }
158 158
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/ImageController.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     public function __construct() {
28 28
         parent::__construct();
29 29
 
30
-        $this->middleware('add.lookup.tables:ImageCategory', ['only' => ['index','create','edit']]);
30
+        $this->middleware('add.lookup.tables:ImageCategory', [ 'only' => [ 'index', 'create', 'edit' ] ]);
31 31
     }
32 32
    
33 33
     /**
@@ -45,14 +45,14 @@  discard block
 block discarded – undo
45 45
      * 
46 46
      * @var array 
47 47
      */
48
-    protected $binaryFields = [];
48
+    protected $binaryFields = [ ];
49 49
             
50 50
     /**
51 51
      * Get number of pagination rows
52 52
      * 
53 53
      * @return integer
54 54
      */
55
-    public function getRowsToPaginate(){
55
+    public function getRowsToPaginate() {
56 56
         
57 57
         return env('ADMIN_MEDIA_PAGINATE', 12);
58 58
     }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      * @param object $object
64 64
      * @param Request $request
65 65
      */
66
-    public function associateRelationships($object, Request $request){
66
+    public function associateRelationships($object, Request $request) {
67 67
         
68 68
         /**
69 69
          * Validate category ID, if failed set to default
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         /**
84 84
          * Validator OK - save it
85 85
          */
86
-        else{
86
+        else {
87 87
 
88 88
             $object->imagecategories()->associate($request->input('imagecategory_id'));
89 89
         } 
@@ -107,11 +107,11 @@  discard block
 block discarded – undo
107 107
             /**
108 108
              * Image has an url
109 109
              */
110
-            if(strlen($request->input('url') > 5)){
110
+            if (strlen($request->input('url') > 5)) {
111 111
                 $object->addMedia($request->file('image'))->toMediaCollection('images')
112 112
                     ->usingName($request->input('url'));
113 113
             }
114
-            else{
114
+            else {
115 115
                 $object->addMedia($request->file('image'))->toMediaCollection('images');
116 116
             }
117 117
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,8 +110,7 @@
 block discarded – undo
110 110
             if(strlen($request->input('url') > 5)){
111 111
                 $object->addMedia($request->file('image'))->toMediaCollection('images')
112 112
                     ->usingName($request->input('url'));
113
-            }
114
-            else{
113
+            } else{
115 114
                 $object->addMedia($request->file('image'))->toMediaCollection('images');
116 115
             }
117 116
 
Please login to merge, or discard this patch.
app/Http/Controllers/Media/ImageController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -40,17 +40,17 @@  discard block
 block discarded – undo
40 40
         /**
41 41
          * Get META information
42 42
          */
43
-        $imageMeta = Image::where(['url' => $request->imageName])->first();
43
+        $imageMeta = Image::where([ 'url' => $request->imageName ])->first();
44 44
 
45 45
         /**
46 46
          * File does not exist
47 47
          */
48
-        if(empty($imageMeta) == TRUE){
48
+        if (empty($imageMeta) == TRUE) {
49 49
             App::abort(404);
50 50
         }
51 51
 
52 52
         $mediaItems = $imageMeta->getMedia();
53
-        $fullPathOnDisk = $mediaItems[0]->getPath();
53
+        $fullPathOnDisk = $mediaItems[ 0 ]->getPath();
54 54
 
55 55
 
56 56
         /**
@@ -66,15 +66,15 @@  discard block
 block discarded – undo
66 66
             'Content-Description'       => 'File Transfer',
67 67
             'Content-Transfer-Encoding' => 'binary',
68 68
             'Pragma'                    => 'public',
69
-            'Expires'                   => Carbon::createFromTimestamp(time()+3600)->toRfc2822String(),
69
+            'Expires'                   => Carbon::createFromTimestamp(time() + 3600)->toRfc2822String(),
70 70
             'Last-Modified'             => $imageMeta->updated_at->toRfc2822String()
71 71
         );
72 72
         
73 73
         /**
74 74
          * Response code cached
75 75
          */
76
-        if( (isset($_SERVER['HTTP_IF_NONE_MATCH']) && $_SERVER['HTTP_IF_NONE_MATCH'] == $imageMeta->image_etag)
77
-                || (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && $_SERVER['HTTP_IF_MODIFIED_SINCE'] == $imageMeta->updated_at->toRfc2822String()) ){
76
+        if ((isset($_SERVER[ 'HTTP_IF_NONE_MATCH' ]) && $_SERVER[ 'HTTP_IF_NONE_MATCH' ] == $imageMeta->image_etag)
77
+                || (isset($_SERVER[ 'HTTP_IF_MODIFIED_SINCE' ]) && $_SERVER[ 'HTTP_IF_MODIFIED_SINCE' ] == $imageMeta->updated_at->toRfc2822String())) {
78 78
             
79 79
             $responseCode = 304;
80 80
         }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         /**
83 83
          * Response code not cached, but OK
84 84
          */
85
-        else{
85
+        else {
86 86
             
87 87
             $responseCode = 200;
88 88
         }
Please login to merge, or discard this patch.
app/Http/routesCustom.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,6 +15,6 @@
 block discarded – undo
15 15
 /**
16 16
  * Frontend root
17 17
  */
18
-Route::get('/', ['as' => 'root', function () {
18
+Route::get('/', [ 'as' => 'root', function() {
19 19
         return view('welcome');
20
-}]);
20
+} ]);
Please login to merge, or discard this patch.
app/Settings.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@  discard block
 block discarded – undo
27 27
      * @param $name
28 28
      * @return |null
29 29
      */
30
-    public static function getByName($name){
30
+    public static function getByName($name) {
31 31
         $result = self::where('name', $name)->first();
32
-        if(!empty($result)){
32
+        if (!empty($result)) {
33 33
             return $result->value;
34 34
         }
35
-        else{
35
+        else {
36 36
             return null;
37 37
         }
38 38
     }
@@ -50,21 +50,21 @@  discard block
 block discarded – undo
50 50
      *
51 51
      * @var array
52 52
      */
53
-    protected $dates = ['created_at', 'updated_at', 'deleted_at'];
53
+    protected $dates = [ 'created_at', 'updated_at', 'deleted_at' ];
54 54
     
55 55
     /**
56 56
      * The attributes that are mass assignable.
57 57
      *
58 58
      * @var array
59 59
      */
60
-    protected $fillable = ['name', 'value', 'description'];
60
+    protected $fillable = [ 'name', 'value', 'description' ];
61 61
     
62 62
     /**
63 63
      * Columns to exclude from index
64 64
      * 
65 65
      * @var array 
66 66
      */
67
-    protected $excludedFromIndex = [];
67
+    protected $excludedFromIndex = [ ];
68 68
     
69 69
     /**
70 70
      * Fields to search in fulltext mode
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,7 @@
 block discarded – undo
31 31
         $result = self::where('name', $name)->first();
32 32
         if(!empty($result)){
33 33
             return $result->value;
34
-        }
35
-        else{
34
+        } else{
36 35
             return null;
37 36
         }
38 37
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/AdminModuleController.php 2 patches
Braces   +14 added lines, -30 removed lines patch added patch discarded remove patch
@@ -202,8 +202,7 @@  discard block
 block discarded – undo
202 202
         if ($this->paginateRows == NULL) {
203 203
 
204 204
             return env('ADMIN_PAGINATE', 10);
205
-        }
206
-        else{
205
+        } else{
207 206
 
208 207
             return $this->paginateRows;
209 208
         }
@@ -281,8 +280,7 @@  discard block
 block discarded – undo
281 280
          */
282 281
         if(method_exists($arResults, 'getMedia')){
283 282
             $media = $arResults->getMedia();
284
-        }
285
-        else{
283
+        } else{
286 284
             $media = null;
287 285
         }
288 286
         
@@ -292,8 +290,7 @@  discard block
 block discarded – undo
292 290
          */
293 291
         if(empty($this->customView['index']) == TRUE){
294 292
             $view = $this->moduleBasicTemplatePath . '.index';
295
-        }
296
-        else{
293
+        } else{
297 294
             $view = $this->customView;
298 295
         }
299 296
 
@@ -315,8 +312,7 @@  discard block
 block discarded – undo
315 312
          */
316 313
         if(empty($this->customView['index']) == TRUE){
317 314
             $view = $this->moduleBasicTemplatePath . '.create_edit';
318
-        }
319
-        else{
315
+        } else{
320 316
             $view = $this->customView;
321 317
         }
322 318
         
@@ -365,16 +361,14 @@  discard block
 block discarded – undo
365 361
             if(in_array($name, $this->dateTimeLocalFields)){
366 362
 
367 363
                 $object->{$name} = str_replace('T', ' ', $request->input($name)). ':00';
368
-            }
369
-            else {
364
+            } else {
370 365
 
371 366
                 /**
372 367
                  * Change to null if needed
373 368
                  */
374 369
                 if(strlen($request->$name) < 1){
375 370
                     $object->{$name} = null;
376
-                }
377
-                else {
371
+                } else {
378 372
                     $object->{$name} = $request->input($name);
379 373
                 }
380 374
             }
@@ -407,8 +401,7 @@  discard block
 block discarded – undo
407 401
          */
408 402
         if(!empty($request->custom_route)){
409 403
             return redirect($request->custom_route);
410
-        }
411
-        else {
404
+        } else {
412 405
             return redirect(route($this->moduleBasicRoute . '.index'));
413 406
         }
414 407
     }
@@ -447,8 +440,7 @@  discard block
 block discarded – undo
447 440
          */
448 441
         if(empty($this->customView['index']) == TRUE){
449 442
             $view = $this->moduleBasicTemplatePath . '.create_edit';
450
-        }
451
-        else{
443
+        } else{
452 444
             $view = $this->customView;
453 445
         }
454 446
 
@@ -525,8 +517,7 @@  discard block
 block discarded – undo
525 517
              */
526 518
             if(in_array($name, $this->binaryFields)){
527 519
 
528
-            }
529
-            else{
520
+            } else{
530 521
                 
531 522
                /**
532 523
                 * Empty exception
@@ -539,13 +530,10 @@  discard block
 block discarded – undo
539 530
                    if(in_array($name, $this->dateTimeLocalFields)){
540 531
 
541 532
                        $arResults->$name = str_replace('T', ' ', $request->input($name)). ':00';
542
-                   }
543
-                   else {
533
+                   } else {
544 534
                        $arResults->$name = $request->input($name);
545 535
                    }
546
-               }
547
-               
548
-               else{
536
+               } else{
549 537
                    
550 538
                    /**
551 539
                     * Numeric zero ?
@@ -553,9 +541,7 @@  discard block
 block discarded – undo
553 541
                    if(isset($request->$name) && is_numeric($request->input($name)) == TRUE){
554 542
                        
555 543
                       $arResults->$name = $request->input($name);
556
-                   }
557
-                   
558
-                   else{
544
+                   } else{
559 545
                     $arResults->$name = NULL;
560 546
                    }
561 547
                }
@@ -580,8 +566,7 @@  discard block
 block discarded – undo
580 566
                 
581 567
                 if (empty($request->$value) == FALSE) {
582 568
                    $arResults->$value = $request->$value;
583
-                }
584
-                else{
569
+                } else{
585 570
                     $arResults->$value = NULL;
586 571
                 }
587 572
             }
@@ -602,8 +587,7 @@  discard block
 block discarded – undo
602 587
          */
603 588
         if(!empty($request->custom_route)){
604 589
             return redirect($request->custom_route);
605
-        }
606
-        else {
590
+        } else {
607 591
             return redirect(route($this->moduleBasicRoute . '.index'));
608 592
         }
609 593
     }
Please login to merge, or discard this patch.
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 use App\Transaction;
26 26
 use App\User;
27 27
 
28
-class AdminModuleController extends Controller{
28
+class AdminModuleController extends Controller {
29 29
 
30 30
     /**
31 31
      * Module name
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
          * Module name for blade
145 145
          */
146 146
         $temp = explode('.', $this->moduleBasicRoute);
147
-        View::share('moduleNameBlade', strtolower($temp[0] . "_module_" . $temp[1]));
147
+        View::share('moduleNameBlade', strtolower($temp[ 0 ] . "_module_" . $temp[ 1 ]));
148 148
 
149 149
     }
150 150
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
      *
154 154
      * @param $request
155 155
      */
156
-    protected function afterStore($request, $model){
156
+    protected function afterStore($request, $model) {
157 157
 
158 158
     }
159 159
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      *
163 163
      * @param $request
164 164
      */
165
-    protected function afterUpdate($request, $model){
165
+    protected function afterUpdate($request, $model) {
166 166
 
167 167
     }
168 168
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      * @param $amount
176 176
      */
177 177
     protected function _saveTransation($status_id = 1, $user_id, $amount,
178
-                                       $campaign_id = null, $payment_id = null, $recommendation_id = null){
178
+                                       $campaign_id = null, $payment_id = null, $recommendation_id = null) {
179 179
 
180 180
         /**
181 181
          * Save transaction
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
      * @param boolean $update
206 206
      * @return boolean
207 207
      */
208
-    public function saveMediaToStorage($object, $request, $update = FALSE){
208
+    public function saveMediaToStorage($object, $request, $update = FALSE) {
209 209
         
210 210
         return FALSE;
211 211
     }
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 
222 222
             return env('ADMIN_PAGINATE', 10);
223 223
         }
224
-        else{
224
+        else {
225 225
 
226 226
             return $this->paginateRows;
227 227
         }
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
      * @param object $object
234 234
      * @param Request $request
235 235
      */
236
-    public function associateRelationships($object, Request $request){
236
+    public function associateRelationships($object, Request $request) {
237 237
         
238 238
     }
239 239
     
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
      * @param object $object
244 244
      * @param Request $request
245 245
      */
246
-    public function associateRelationshipsWithID($object, Request $request){
246
+    public function associateRelationshipsWithID($object, Request $request) {
247 247
         
248 248
     }
249 249
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
      * 
253 253
      * @param object $object
254 254
      */
255
-    public function resetCache($object){
255
+    public function resetCache($object) {
256 256
         
257 257
     }
258 258
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
      * @param $arResult
263 263
      * @return mixed
264 264
      */
265
-    public function changeEditResultField($arResult){
265
+    public function changeEditResultField($arResult) {
266 266
         return $arResult;
267 267
     }
268 268
 
@@ -297,10 +297,10 @@  discard block
 block discarded – undo
297 297
         /**
298 298
          * Get media
299 299
          */
300
-        if(method_exists($arResults, 'getMedia')){
300
+        if (method_exists($arResults, 'getMedia')) {
301 301
             $media = $arResults->getMedia();
302 302
         }
303
-        else{
303
+        else {
304 304
             $media = null;
305 305
         }
306 306
         
@@ -308,17 +308,17 @@  discard block
 block discarded – undo
308 308
         /**
309 309
          * Choose the view
310 310
          */
311
-        if(empty($this->customView['index']) == TRUE){
311
+        if (empty($this->customView[ 'index' ]) == TRUE) {
312 312
             $view = $this->moduleBasicTemplatePath . '.index';
313 313
         }
314
-        else{
314
+        else {
315 315
             $view = $this->customView;
316 316
         }
317 317
 
318 318
         /**
319 319
          * Return page
320 320
          */
321
-        return view($view, ['results' => $arResults, 'media' => $media]);
321
+        return view($view, [ 'results' => $arResults, 'media' => $media ]);
322 322
     }
323 323
 
324 324
     /**
@@ -331,10 +331,10 @@  discard block
 block discarded – undo
331 331
         /**
332 332
          * Choose the view
333 333
          */
334
-        if(empty($this->customView['index']) == TRUE){
334
+        if (empty($this->customView[ 'index' ]) == TRUE) {
335 335
             $view = $this->moduleBasicTemplatePath . '.create_edit';
336 336
         }
337
-        else{
337
+        else {
338 338
             $view = $this->customView;
339 339
         }
340 340
         
@@ -356,8 +356,8 @@  discard block
 block discarded – undo
356 356
          * Change the validation array
357 357
          */
358 358
         foreach ($this->arValidationArray as $name => $value) {
359
-            if(strpos($this->arValidationArray[$name], 'unique') > 0){
360
-                $this->arValidationArray[$name] = $value . ',NULL,id,deleted_at,NULL';
359
+            if (strpos($this->arValidationArray[ $name ], 'unique') > 0) {
360
+                $this->arValidationArray[ $name ] = $value . ',NULL,id,deleted_at,NULL';
361 361
             }
362 362
         }
363 363
 
@@ -380,16 +380,16 @@  discard block
 block discarded – undo
380 380
             /**
381 381
              * Datetime
382 382
              */
383
-            if(in_array($name, $this->dateTimeLocalFields)){
383
+            if (in_array($name, $this->dateTimeLocalFields)) {
384 384
 
385
-                $object->{$name} = str_replace('T', ' ', $request->input($name)). ':00';
385
+                $object->{$name} = str_replace('T', ' ', $request->input($name)) . ':00';
386 386
             }
387 387
             else {
388 388
 
389 389
                 /**
390 390
                  * Change to null if needed
391 391
                  */
392
-                if(strlen($request->$name) < 1){
392
+                if (strlen($request->$name) < 1) {
393 393
                     $object->{$name} = null;
394 394
                 }
395 395
                 else {
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
         /**
429 429
          * Redirect to index
430 430
          */
431
-        if(!empty($request->custom_route)){
431
+        if (!empty($request->custom_route)) {
432 432
             return redirect($request->custom_route);
433 433
         }
434 434
         else {
@@ -457,21 +457,21 @@  discard block
 block discarded – undo
457 457
          */
458 458
         if (empty($arResults)) {
459 459
 
460
-            return redirect(route($this->moduleBasicRoute . '.index'))->withInput()->withErrors(['edit' => trans('validation.row_not_exist')]);
460
+            return redirect(route($this->moduleBasicRoute . '.index'))->withInput()->withErrors([ 'edit' => trans('validation.row_not_exist') ]);
461 461
         }
462 462
 
463 463
         /**
464 464
          * Set the put method for update
465 465
          */
466
-        $arResults['_method'] = 'PUT';
466
+        $arResults[ '_method' ] = 'PUT';
467 467
         
468 468
         /**
469 469
          * Choose the view
470 470
          */
471
-        if(empty($this->customView['index']) == TRUE){
471
+        if (empty($this->customView[ 'index' ]) == TRUE) {
472 472
             $view = $this->moduleBasicTemplatePath . '.create_edit';
473 473
         }
474
-        else{
474
+        else {
475 475
             $view = $this->customView;
476 476
         }
477 477
 
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
         /**
481 481
          * Return page
482 482
          */
483
-        return view($view, ['results' => $arResults]);
483
+        return view($view, [ 'results' => $arResults ]);
484 484
     }
485 485
 
486 486
     /**
@@ -508,8 +508,8 @@  discard block
 block discarded – undo
508 508
          */
509 509
         foreach ($this->arValidationArray as $name => $value) {
510 510
             
511
-            if(strpos($this->arValidationArray[$name], 'unique') > 0){
512
-                $this->arValidationArray[$name] = $value . ','.$id.',id,deleted_at,NULL';
511
+            if (strpos($this->arValidationArray[ $name ], 'unique') > 0) {
512
+                $this->arValidationArray[ $name ] = $value . ',' . $id . ',id,deleted_at,NULL';
513 513
             }
514 514
         }
515 515
 
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
          */
530 530
         if ($arResults == FALSE) {
531 531
 
532
-            return redirect(route($this->moduleBasicRoute . '.index'))->withInput()->withErrors(['edit' => trans('validation.row_not_exist')]);
532
+            return redirect(route($this->moduleBasicRoute . '.index'))->withInput()->withErrors([ 'edit' => trans('validation.row_not_exist') ]);
533 533
         }
534 534
         
535 535
         /**
@@ -546,10 +546,10 @@  discard block
 block discarded – undo
546 546
              * Binary fields will not be updated if empty
547 547
              *
548 548
              */
549
-            if(in_array($name, $this->binaryFields)){
549
+            if (in_array($name, $this->binaryFields)) {
550 550
 
551 551
             }
552
-            else{
552
+            else {
553 553
                 
554 554
                /**
555 555
                 * Empty exception
@@ -559,26 +559,26 @@  discard block
 block discarded – undo
559 559
                    /**
560 560
                     * Datetime
561 561
                     */
562
-                   if(in_array($name, $this->dateTimeLocalFields)){
562
+                   if (in_array($name, $this->dateTimeLocalFields)) {
563 563
 
564
-                       $arResults->$name = str_replace('T', ' ', $request->input($name)). ':00';
564
+                       $arResults->$name = str_replace('T', ' ', $request->input($name)) . ':00';
565 565
                    }
566 566
                    else {
567 567
                        $arResults->$name = $request->input($name);
568 568
                    }
569 569
                }
570 570
                
571
-               else{
571
+               else {
572 572
                    
573 573
                    /**
574 574
                     * Numeric zero ?
575 575
                     */
576
-                   if(isset($request->$name) && is_numeric($request->input($name)) == TRUE){
576
+                   if (isset($request->$name) && is_numeric($request->input($name)) == TRUE) {
577 577
                        
578 578
                       $arResults->$name = $request->input($name);
579 579
                    }
580 580
                    
581
-                   else{
581
+                   else {
582 582
                     $arResults->$name = NULL;
583 583
                    }
584 584
                }
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
         /**
597 597
          * Save media to storage
598 598
          */
599
-        if($this->saveMediaToStorage($arResults, $request, TRUE) == TRUE){
599
+        if ($this->saveMediaToStorage($arResults, $request, TRUE) == TRUE) {
600 600
             
601 601
             // Update binary fields
602 602
             foreach ($this->binaryFields as $name => $value) {
@@ -604,7 +604,7 @@  discard block
 block discarded – undo
604 604
                 if (empty($request->$value) == FALSE) {
605 605
                    $arResults->$value = $request->$value;
606 606
                 }
607
-                else{
607
+                else {
608 608
                     $arResults->$value = NULL;
609 609
                 }
610 610
             }
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
         /**
629 629
          * Redirect to index
630 630
          */
631
-        if(!empty($request->custom_route)){
631
+        if (!empty($request->custom_route)) {
632 632
             return redirect($request->custom_route);
633 633
         }
634 634
         else {
Please login to merge, or discard this patch.
app/Providers/AppServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     public function boot()
16 16
     {
17 17
         //
18
-        require_once app_path().'/Http/Helpers.php';
18
+        require_once app_path() . '/Http/Helpers.php';
19 19
         Paginator::useBootstrap();
20 20
     }
21 21
 
Please login to merge, or discard this patch.