Completed
Push — master ( 6ae55b...a91b57 )
by Jan
06:38
created
app/Http/Middleware/AddPublishedAt.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,13 +28,13 @@
 block discarded – undo
28 28
     public function handle($request, Closure $next)
29 29
     {
30 30
  
31
-        if($request->has('published')){
31
+        if ($request->has('published')) {
32 32
             
33
-            $request->merge(['published_at' => \Carbon\Carbon::now()]);
33
+            $request->merge([ 'published_at' => \Carbon\Carbon::now() ]);
34 34
         }
35
-        else{
35
+        else {
36 36
 
37
-            $request->merge(['published_at' => NULL]);
37
+            $request->merge([ 'published_at' => NULL ]);
38 38
         }
39 39
         
40 40
         return $next($request);
Please login to merge, or discard this patch.
app/Http/Middleware/MediaImageSelect.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,15 +30,15 @@
 block discarded – undo
30 30
     public function handle($request, Closure $next)
31 31
     {
32 32
         $intArgs = func_num_args();
33
-        for($a = 2; $a < $intArgs; $a++){
33
+        for ($a = 2; $a < $intArgs; $a++) {
34 34
             
35 35
             $model = func_get_arg($a);
36
-            $modelWithNamespace = 'App\\'.$model;
36
+            $modelWithNamespace = 'App\\' . $model;
37 37
             
38 38
             
39
-            $array = ['other_tables' =>
39
+            $array = [ 'other_tables' =>
40 40
             [
41
-                $model => $modelWithNamespace::orderBy('id', 'desc')->get(['id', 'name', 'url', 'image_extension'])
41
+                $model => $modelWithNamespace::orderBy('id', 'desc')->get([ 'id', 'name', 'url', 'image_extension' ])
42 42
             ]
43 43
                 ];
44 44
             
Please login to merge, or discard this patch.
app/Http/Middleware/AddLookupTables.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,12 +31,12 @@
 block discarded – undo
31 31
          * Get lookup table data and insert into request
32 32
          */
33 33
         $intArgs = func_num_args();
34
-        for($a = 2; $a < $intArgs; $a++){
34
+        for ($a = 2; $a < $intArgs; $a++) {
35 35
             
36 36
             $model = func_get_arg($a);
37
-            $modelWithNamespace = 'App\\'.$model;
37
+            $modelWithNamespace = 'App\\' . $model;
38 38
             
39
-            $request->merge([$model => $modelWithNamespace::orderBy('name', 'asc')->get()]);
39
+            $request->merge([ $model => $modelWithNamespace::orderBy('name', 'asc')->get() ]);
40 40
         }
41 41
   
42 42
         return $next($request);     
Please login to merge, or discard this patch.
app/Http/Helpers.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -44,16 +44,16 @@  discard block
 block discarded – undo
44 44
                  */
45 45
                 if (is_numeric($fieldName) == TRUE) {
46 46
                     $fieldName = $fieldAttributes;
47
-                    $fieldAttributes = ['operator' => '=', 'prefix' => '', 'sufix' => ''];
47
+                    $fieldAttributes = [ 'operator' => '=', 'prefix' => '', 'sufix' => '' ];
48 48
                 }
49
-                if (isset($fieldAttributes['operator']) == FALSE) {
50
-                    $fieldAttributes['operator'] = '=';
49
+                if (isset($fieldAttributes[ 'operator' ]) == FALSE) {
50
+                    $fieldAttributes[ 'operator' ] = '=';
51 51
                 }
52
-                if (isset($fieldAttributes['prefix']) == FALSE) {
53
-                    $fieldAttributes['prefix'] = '';
52
+                if (isset($fieldAttributes[ 'prefix' ]) == FALSE) {
53
+                    $fieldAttributes[ 'prefix' ] = '';
54 54
                 }
55
-                if (isset($fieldAttributes['sufix']) == FALSE) {
56
-                    $fieldAttributes['sufix'] = '';
55
+                if (isset($fieldAttributes[ 'sufix' ]) == FALSE) {
56
+                    $fieldAttributes[ 'sufix' ] = '';
57 57
                 }
58 58
 
59 59
                 /**
@@ -61,13 +61,13 @@  discard block
 block discarded – undo
61 61
                  */
62 62
                 if ($first == TRUE) {
63 63
 
64
-                    $query->where($fieldName, $fieldAttributes['operator'], $fieldAttributes['prefix'] . $word
65
-                        . $fieldAttributes['sufix']);
64
+                    $query->where($fieldName, $fieldAttributes[ 'operator' ], $fieldAttributes[ 'prefix' ] . $word
65
+                        . $fieldAttributes[ 'sufix' ]);
66 66
 
67 67
                     $first = FALSE;
68 68
                 } else {
69
-                    $query->orWhere($fieldName, $fieldAttributes['operator'], $fieldAttributes['prefix'] . $word
70
-                        . $fieldAttributes['sufix']);
69
+                    $query->orWhere($fieldName, $fieldAttributes[ 'operator' ], $fieldAttributes[ 'prefix' ] . $word
70
+                        . $fieldAttributes[ 'sufix' ]);
71 71
                 }
72 72
             }
73 73
         }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      * @param array $possibleParameters
105 105
      * @return boolean
106 106
      */
107
-    public static function resetSaveIndexParameters($module, $possibleParameters = ['search', 'orderbycolumn', 'orderbytype', 'relation'])
107
+    public static function resetSaveIndexParameters($module, $possibleParameters = [ 'search', 'orderbycolumn', 'orderbytype', 'relation' ])
108 108
     {
109 109
 
110 110
         /**
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
          */
118 118
         foreach ($allParameters as $parameter => $value) {
119 119
 
120
-            $cacheKey = implode('.', [$module, Auth::user()->id, $parameter]);
120
+            $cacheKey = implode('.', [ $module, Auth::user()->id, $parameter ]);
121 121
 
122 122
             /**
123 123
              * Reset
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             if (empty($value) == TRUE) {
126 126
 
127 127
                 Cache::forget($cacheKey);
128
-                unset($allParameters[$parameter]);
128
+                unset($allParameters[ $parameter ]);
129 129
             } /**
130 130
              * Save
131 131
              */ else {
@@ -139,9 +139,9 @@  discard block
 block discarded – undo
139 139
          */
140 140
         foreach ($possibleParameters as $parameter => $value) {
141 141
 
142
-            $cacheKey = implode('.', [$module, Auth::user()->id, $value]);
142
+            $cacheKey = implode('.', [ $module, Auth::user()->id, $value ]);
143 143
 
144
-            $allParameters[$value] = Cache::get($cacheKey);
144
+            $allParameters[ $value ] = Cache::get($cacheKey);
145 145
         }
146 146
 
147 147
         /**
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 
250 250
             if (preg_match('/content: \$fa-var-(.*)\;/', $row, $matches) == TRUE) {
251 251
 
252
-                $icons[] = "fa-" . $matches[1];
252
+                $icons[ ] = "fa-" . $matches[ 1 ];
253 253
             }
254 254
 
255 255
         }
Please login to merge, or discard this patch.
app/AdvertLocation.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,21 +33,21 @@  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', 'description', 'color'];
43
+    protected $fillable = [ 'name', 'description', 'color' ];
44 44
     
45 45
     /**
46 46
      * Columns to exclude from index
47 47
      * 
48 48
      * @var array 
49 49
      */
50
-    protected $excludedFromIndex = [];
50
+    protected $excludedFromIndex = [ ];
51 51
 
52 52
     /**
53 53
      * Fields to search in fulltext mode
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      * 
83 83
      * @return object
84 84
      */
85
-    public function adverts(){
85
+    public function adverts() {
86 86
         
87 87
         return $this->belongsToMany('App\Advert', 'advert_advertlocation', 'advert_id', 'advertlocation_id');
88 88
     }
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      * @param type $query
94 94
      * @return object
95 95
      */
96
-    public function scopeRelationships($query){
96
+    public function scopeRelationships($query) {
97 97
         
98 98
         return $query->with('adverts');
99 99
     }
Please login to merge, or discard this patch.
app/PageCategory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,21 +32,21 @@  discard block
 block discarded – undo
32 32
      *
33 33
      * @var array
34 34
      */
35
-    protected $dates = ['created_at', 'updated_at', 'deleted_at'];
35
+    protected $dates = [ 'created_at', 'updated_at', 'deleted_at' ];
36 36
 
37 37
     /**
38 38
      * The attributes that are mass assignable.
39 39
      *
40 40
      * @var array
41 41
      */
42
-    protected $fillable = ['name', 'description', 'class'];
42
+    protected $fillable = [ 'name', 'description', 'class' ];
43 43
     
44 44
     /**
45 45
      * Columns to exclude from index
46 46
      * 
47 47
      * @var array 
48 48
      */
49
-    protected $excludedFromIndex = [];
49
+    protected $excludedFromIndex = [ ];
50 50
 
51 51
     /**
52 52
      * Fields to search in fulltext mode
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      * 
87 87
      * @return object
88 88
      */
89
-    public function pages(){
89
+    public function pages() {
90 90
         
91 91
         return $this->belongsToMany('App\Page', 'page_pagecategory', 'page_id', 'pagecategory_id');
92 92
     }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      * @param query $query
98 98
      * @return query
99 99
      */
100
-    public function scopeRelationships($query){
100
+    public function scopeRelationships($query) {
101 101
         
102 102
         return $query->with('pages');
103 103
     }
Please login to merge, or discard this patch.
app/Feedback.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,21 +33,21 @@  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', 'description', 'position', 'image_id'];
43
+    protected $fillable = [ 'name', 'description', 'position', 'image_id' ];
44 44
     
45 45
     /**
46 46
      * Columns to exclude from index
47 47
      * 
48 48
      * @var array 
49 49
      */
50
-    protected $excludedFromIndex = ['image'];
50
+    protected $excludedFromIndex = [ 'image' ];
51 51
     
52 52
     /**
53 53
      * Fields to search in fulltext mode
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      * 
84 84
      * @return object
85 85
      */
86
-    public function images(){
86
+    public function images() {
87 87
         
88 88
         return $this->belongsTo('App\Image', 'image_id')->select('id', 'name', 'description', 
89 89
                 'alt', 'url', 'imagecategory_id', 'image_mime_type', 'image_extension', 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      * @param query $query
98 98
      * @return query
99 99
      */
100
-    public function scopeRelationships($query){
100
+    public function scopeRelationships($query) {
101 101
         
102 102
         return $query->with('images', 'images.imagecategories');
103 103
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/SettingsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,5 +24,5 @@
 block discarded – undo
24 24
     protected $arValidationArray = [
25 25
                     'name' => 'required|max:255|unique:settings,name',
26 26
                     'value' => 'max:255',
27
-                    'description' => 'max:255'];
27
+                    'description' => 'max:255' ];
28 28
 }
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
@@ -52,17 +52,17 @@  discard block
 block discarded – undo
52 52
         /**
53 53
          * File not cached
54 54
          */
55
-        else{
55
+        else {
56 56
             
57 57
             /**
58 58
              * Get META information
59 59
              */
60
-            $imageMeta = Image::where(['url' => $request->imageName, 'image_extension' => $request->imageExtension])->first(['image_mime_type', 'image_size', 'id', 'updated_at', 'image_etag']);
60
+            $imageMeta = Image::where([ 'url' => $request->imageName, 'image_extension' => $request->imageExtension ])->first([ 'image_mime_type', 'image_size', 'id', 'updated_at', 'image_etag' ]);
61 61
             
62 62
             /**
63 63
              * File does not exist
64 64
              */
65
-            if(empty($imageMeta) == TRUE){
65
+            if (empty($imageMeta) == TRUE) {
66 66
                 App::abort(404);
67 67
             }
68 68
             
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             'Content-Type'              => $imageMeta->image_mime_type,
92 92
             'Content-Transfer-Encoding' => 'binary',
93 93
             'Pragma'                    => 'public',
94
-            'Expires'                   => Carbon::createFromTimestamp(time()+3600)->toRfc2822String(),
94
+            'Expires'                   => Carbon::createFromTimestamp(time() + 3600)->toRfc2822String(),
95 95
             'Last-Modified'             => $imageMeta->updated_at->toRfc2822String(),
96 96
             'Etag'                      => $imageMeta->image_etag,
97 97
         );
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
         /**
100 100
          * Response code cached
101 101
          */
102
-        if( (isset($_SERVER['HTTP_IF_NONE_MATCH']) && $_SERVER['HTTP_IF_NONE_MATCH'] == $imageMeta->image_etag)
103
-                || (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && $_SERVER['HTTP_IF_MODIFIED_SINCE'] == $imageMeta->updated_at->toRfc2822String()) ){
102
+        if ((isset($_SERVER[ 'HTTP_IF_NONE_MATCH' ]) && $_SERVER[ 'HTTP_IF_NONE_MATCH' ] == $imageMeta->image_etag)
103
+                || (isset($_SERVER[ 'HTTP_IF_MODIFIED_SINCE' ]) && $_SERVER[ 'HTTP_IF_MODIFIED_SINCE' ] == $imageMeta->updated_at->toRfc2822String())) {
104 104
             
105 105
             $responseCode = 304;
106 106
         }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         /**
109 109
          * Response code not cached, but OK
110 110
          */
111
-        else{
111
+        else {
112 112
             
113 113
             $responseCode = 200;
114 114
         }
Please login to merge, or discard this patch.