Completed
Push — master ( df26d3...be44c5 )
by Jan
06:02
created
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.
app/AdminModelTrait.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      *
36 36
      * @return \Illuminate\Database\Eloquent\Builder
37 37
      */
38
-    public function scopeFulltextAllColumns(Builder $query){
38
+    public function scopeFulltextAllColumns(Builder $query) {
39 39
   
40 40
         return Helpers::virtualFulltextSearchColumns($query, request('search'), $this->fulltextFields);
41 41
     }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      *
46 46
      * @return \Illuminate\Database\Eloquent\Builder
47 47
      */
48
-    public function scopeOrderByColumns(Builder $query){
48
+    public function scopeOrderByColumns(Builder $query) {
49 49
         
50 50
         return Helpers::orderByColumns($query, $this->defaultOrderBy);
51 51
     }
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function scopeExcludeFromIndex(Builder $query)
59 59
     {
60
-        return $query->select( array_diff(Schema::getColumnListing($this->table), $this->excludedFromIndex) );
60
+        return $query->select(array_diff(Schema::getColumnListing($this->table), $this->excludedFromIndex));
61 61
     }
62 62
     
63 63
     /**
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function scopeExcludeFromFind(Builder $query)
69 69
     {
70
-        if(isset($this->excludedFromFind) == TRUE && is_array($this->excludedFromFind) == TRUE){
71
-            return $query->select( array_diff(Schema::getColumnListing($this->table), $this->excludedFromFind) );
70
+        if (isset($this->excludedFromFind) == TRUE && is_array($this->excludedFromFind) == TRUE) {
71
+            return $query->select(array_diff(Schema::getColumnListing($this->table), $this->excludedFromFind));
72 72
         }
73
-        else{
73
+        else {
74 74
             return $query;
75 75
         }
76 76
     }
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      *
81 81
      * @return \Illuminate\Database\Eloquent\Builder
82 82
      */
83
-    public function scopeRelationships(Builder $query){
83
+    public function scopeRelationships(Builder $query) {
84 84
         
85 85
         return $query;
86 86
     }
@@ -90,30 +90,30 @@  discard block
 block discarded – undo
90 90
      *
91 91
      * @return \Illuminate\Database\Eloquent\Builder
92 92
      */
93
-    public function scopeExternalTablesFilter(Builder $query){
93
+    public function scopeExternalTablesFilter(Builder $query) {
94 94
         
95
-        if(Request::input('relation')){
95
+        if (Request::input('relation')) {
96 96
             
97
-            $allTables = [];
97
+            $allTables = [ ];
98 98
             
99 99
             $relations = explode(',', Request::input('relation'));
100 100
             
101
-            foreach ($relations as $relation){
101
+            foreach ($relations as $relation) {
102 102
                 
103 103
                 $keyvalue = explode(':', $relation);
104 104
                 
105
-                $key = trim($keyvalue[0]);
106
-                $value = trim($keyvalue[1]);
105
+                $key = trim($keyvalue[ 0 ]);
106
+                $value = trim($keyvalue[ 1 ]);
107 107
                 
108
-                $allTables[$key] = $value;
108
+                $allTables[ $key ] = $value;
109 109
                 
110
-                if(is_numeric($value) == TRUE){
110
+                if (is_numeric($value) == TRUE) {
111 111
                     
112
-                    $query->where(strtolower($key)."_id", '=', $value);
112
+                    $query->where(strtolower($key) . "_id", '=', $value);
113 113
                 }
114 114
             }
115 115
             
116
-             request()->merge(['external_tables_filter' => $allTables]);
116
+             request()->merge([ 'external_tables_filter' => $allTables ]);
117 117
         }
118 118
         
119 119
         return $query;
Please login to merge, or discard this patch.