Test Failed
Pull Request — dev (#192)
by Alexey
08:05
created
app/Providers/BladeServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
          * The block of code inside this directive indicates
27 27
          * the chosen language requests RTL support.
28 28
          */
29
-        Blade::if('langrtl', function ($session_identifier = 'lang-rtl') {
29
+        Blade::if ('langrtl', function($session_identifier = 'lang-rtl') {
30 30
             return session()->has($session_identifier);
31 31
         });
32 32
     }
Please login to merge, or discard this patch.
app/Providers/AuthServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         $accountRepository = $this->app->make(AccountRepository::class);
38 38
 
39 39
         foreach (config('permissions') as $key => $permissions) {
40
-            Gate::define($key, function (User $user) use ($accountRepository, $key) {
40
+            Gate::define($key, function(User $user) use ($accountRepository, $key) {
41 41
                 return $accountRepository->hasPermission($user, $key);
42 42
             });
43 43
         }
Please login to merge, or discard this patch.
app/helpers.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 use Illuminate\Database\Eloquent\Model;
4 4
 
5
-if (! function_exists('home_route')) {
5
+if (!function_exists('home_route')) {
6 6
     /**
7 7
      * Return the route to the "home" page depending on authentication/authorization status.
8 8
      *
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     }
19 19
 }
20 20
 
21
-if (! function_exists('is_admin_route')) {
21
+if (!function_exists('is_admin_route')) {
22 22
     /**
23 23
      * @param \Illuminate\Http\Request $request
24 24
      *
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     }
33 33
 }
34 34
 
35
-if (! function_exists('image_template_url')) {
35
+if (!function_exists('image_template_url')) {
36 36
     /**
37 37
      * @param $template
38 38
      * @param $imagePath
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     }
48 48
 }
49 49
 
50
-if (! function_exists('localize_url')) {
50
+if (!function_exists('localize_url')) {
51 51
     function localize_url($locale = null, $attributes = [], Model $translatable = null)
52 52
     {
53 53
         $url = null;
Please login to merge, or discard this patch.
app/Repositories/Frontend/Auth/UserRepository.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function create(array $data)
93 93
     {
94
-        return DB::transaction(function () use ($data) {
94
+        return DB::transaction(function() use ($data) {
95 95
             $user = parent::create([
96 96
                 'first_name'        => $data['first_name'],
97 97
                 'last_name'         => $data['last_name'],
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             // No image being passed
152 152
             if ($input['avatar_type'] == 'storage') {
153 153
                 // If there is no existing image
154
-                if (! strlen(auth()->user()->avatar_location)) {
154
+                if (!strlen(auth()->user()->avatar_location)) {
155 155
                     throw new GeneralException('You must supply a profile image.');
156 156
                 }
157 157
             } else {
@@ -260,9 +260,9 @@  discard block
 block discarded – undo
260 260
          * The true flag indicate that it is a social account
261 261
          * Which triggers the script to use some default values in the create method
262 262
          */
263
-        if (! $user) {
263
+        if (!$user) {
264 264
             // Registration is not enabled
265
-            if (! config('access.registration')) {
265
+            if (!config('access.registration')) {
266 266
                 throw new GeneralException(__('exceptions.frontend.auth.registration_disabled'));
267 267
             }
268 268
 
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
         }
284 284
 
285 285
         // See if the user has logged in with this social account before
286
-        if (! $user->hasProvider($provider)) {
286
+        if (!$user->hasProvider($provider)) {
287 287
             // Gather the provider data for saving and associate it with the user
288 288
             $user->providers()->save(new SocialAccount([
289 289
                 'provider'    => $provider,
@@ -322,12 +322,12 @@  discard block
 block discarded – undo
322 322
             $result['last_name'] = null;
323 323
         }
324 324
 
325
-        if (! empty($parts) && $size == 1) {
325
+        if (!empty($parts) && $size == 1) {
326 326
             $result['first_name'] = $parts[0];
327 327
             $result['last_name'] = null;
328 328
         }
329 329
 
330
-        if (! empty($parts) && $size >= 2) {
330
+        if (!empty($parts) && $size >= 2) {
331 331
             $result['first_name'] = $parts[0];
332 332
             $result['last_name'] = $parts[1];
333 333
         }
Please login to merge, or discard this patch.
app/Repositories/BaseRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     {
91 91
         $model = app()->make($this->model());
92 92
 
93
-        if (! $model instanceof Model) {
93
+        if (!$model instanceof Model) {
94 94
             throw new GeneralException("Class {$this->model()} must be an instance of ".Model::class);
95 95
         }
96 96
 
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
             $this->query->orderBy($orders['column'], $orders['direction']);
433 433
         }
434 434
 
435
-        if (isset($this->take) and ! is_null($this->take)) {
435
+        if (isset($this->take) and !is_null($this->take)) {
436 436
             $this->query->take($this->take);
437 437
         }
438 438
 
Please login to merge, or discard this patch.
app/Repositories/EloquentFormSettingRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             throw new GeneralException(__('exceptions.backend.form_settings.already_exist'));
50 50
         }
51 51
 
52
-        if (! $formSetting->save()) {
52
+        if (!$formSetting->save()) {
53 53
             throw new GeneralException(__('exceptions.backend.form_settings.create'));
54 54
         }
55 55
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             throw new GeneralException(__('exceptions.backend.form_settings.already_exist'));
74 74
         }
75 75
 
76
-        if (! $formSetting->update($input)) {
76
+        if (!$formSetting->update($input)) {
77 77
             throw new GeneralException(__('exceptions.backend.form_settings.update'));
78 78
         }
79 79
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function destroy(FormSetting $formSetting)
91 91
     {
92
-        if (! $formSetting->delete()) {
92
+        if (!$formSetting->delete()) {
93 93
             throw new GeneralException(__('exceptions.backend.form_settings.delete'));
94 94
         }
95 95
 
Please login to merge, or discard this patch.
app/Repositories/EloquentRedirectionRepository.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             throw new GeneralException(__('exceptions.backend.redirections.already_exist'));
50 50
         }
51 51
 
52
-        if (! $redirection->save()) {
52
+        if (!$redirection->save()) {
53 53
             throw new GeneralException(__('exceptions.backend.redirections.create'));
54 54
         }
55 55
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             throw new GeneralException(__('exceptions.backend.redirections.already_exist'));
74 74
         }
75 75
 
76
-        if (! $redirection->update($input)) {
76
+        if (!$redirection->update($input)) {
77 77
             throw new GeneralException(__('exceptions.backend.redirections.update'));
78 78
         }
79 79
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function destroy(Redirection $redirection)
91 91
     {
92
-        if (! $redirection->delete()) {
92
+        if (!$redirection->delete()) {
93 93
             throw new GeneralException(__('exceptions.backend.redirections.delete'));
94 94
         }
95 95
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      */
106 106
     public function batchDestroy(array $ids)
107 107
     {
108
-        DB::transaction(function () use ($ids) {
108
+        DB::transaction(function() use ($ids) {
109 109
             // This wont call eloquent events, change to destroy if needed
110 110
             if ($this->query()->whereIn('id', $ids)->delete()) {
111 111
                 return true;
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      */
127 127
     public function batchEnable(array $ids)
128 128
     {
129
-        DB::transaction(function () use ($ids) {
129
+        DB::transaction(function() use ($ids) {
130 130
             if ($this->query()->whereIn('id', $ids)
131 131
                 ->update(['active' => true])
132 132
             ) {
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     public function batchDisable(array $ids)
150 150
     {
151
-        DB::transaction(function () use ($ids) {
151
+        DB::transaction(function() use ($ids) {
152 152
             if ($this->query()->whereIn('id', $ids)
153 153
                 ->update(['active' => false])
154 154
             ) {
Please login to merge, or discard this patch.
app/Repositories/EloquentPostRepository.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -114,25 +114,25 @@  discard block
 block discarded – undo
114 114
     private function save(Post $post, array $input, UploadedFile $image = null)
115 115
     {
116 116
         if ($post->exists) {
117
-            if (! Gate::check('update', $post)) {
117
+            if (!Gate::check('update', $post)) {
118 118
                 throw new GeneralException(__('exceptions.backend.posts.save'));
119 119
             }
120 120
         } else {
121 121
             $post->user_id = auth()->id();
122 122
         }
123 123
 
124
-        if (Post::PUBLISHED === $post->status && ! Gate::check('publish posts')) {
124
+        if (Post::PUBLISHED === $post->status && !Gate::check('publish posts')) {
125 125
             // User with no publish permissions must go to moderation awaiting
126 126
             $post->status = Post::PENDING;
127 127
         }
128 128
 
129
-        DB::transaction(function () use ($post, $input, $image) {
130
-            if (! $post->save()) {
129
+        DB::transaction(function() use ($post, $input, $image) {
130
+            if (!$post->save()) {
131 131
                 throw new GeneralException(__('exceptions.backend.posts.save'));
132 132
             }
133 133
 
134 134
             if (isset($input['meta'])) {
135
-                if (! $post->meta) {
135
+                if (!$post->meta) {
136 136
                     $post->meta()->create($input['meta']);
137 137
                 } else {
138 138
                     $post->meta->update($input['meta']);
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             $currentFeaturedImage = $post->getMedia('featured image')->first();
152 152
 
153 153
             // Delete current image if replaced or delete asking
154
-            if ($currentFeaturedImage && ($image || ! $input['has_featured_image'])) {
154
+            if ($currentFeaturedImage && ($image || !$input['has_featured_image'])) {
155 155
                 $currentFeaturedImage->delete();
156 156
             }
157 157
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      */
176 176
     public function destroy(Post $post)
177 177
     {
178
-        if (! $post->delete()) {
178
+        if (!$post->delete()) {
179 179
             throw new GeneralException(__('exceptions.backend.posts.delete'));
180 180
         }
181 181
 
@@ -203,10 +203,10 @@  discard block
 block discarded – undo
203 203
      */
204 204
     public function batchDestroy(array $ids)
205 205
     {
206
-        DB::transaction(function () use ($ids) {
206
+        DB::transaction(function() use ($ids) {
207 207
             $query = $this->batchQuery($ids);
208 208
 
209
-            if (! Gate::check('delete posts')) {
209
+            if (!Gate::check('delete posts')) {
210 210
                 // Filter to only current user's posts
211 211
                 $query->whereUserId(auth()->id());
212 212
             }
@@ -234,10 +234,10 @@  discard block
 block discarded – undo
234 234
      */
235 235
     public function batchPublish(array $ids)
236 236
     {
237
-        DB::transaction(function () use ($ids) {
237
+        DB::transaction(function() use ($ids) {
238 238
             $query = $this->batchQuery($ids);
239 239
 
240
-            if (! Gate::check('edit posts')) {
240
+            if (!Gate::check('edit posts')) {
241 241
                 // Filter to only current user's posts
242 242
                 $query->whereUserId(auth()->id());
243 243
             }
@@ -267,10 +267,10 @@  discard block
 block discarded – undo
267 267
      */
268 268
     public function batchPin(array $ids)
269 269
     {
270
-        DB::transaction(function () use ($ids) {
270
+        DB::transaction(function() use ($ids) {
271 271
             $query = $this->batchQuery($ids);
272 272
 
273
-            if (! Gate::check('edit posts')) {
273
+            if (!Gate::check('edit posts')) {
274 274
                 // Filter to only current user's posts
275 275
                 $query->whereUserId(auth()->id());
276 276
             }
@@ -295,10 +295,10 @@  discard block
 block discarded – undo
295 295
      */
296 296
     public function batchPromote(array $ids)
297 297
     {
298
-        DB::transaction(function () use ($ids) {
298
+        DB::transaction(function() use ($ids) {
299 299
             $query = $this->batchQuery($ids);
300 300
 
301
-            if (! Gate::check('edit posts')) {
301
+            if (!Gate::check('edit posts')) {
302 302
                 // Filter to only current user's posts
303 303
                 $query->whereUserId(auth()->id());
304 304
             }
Please login to merge, or discard this patch.
app/Repositories/EloquentMetaRepository.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             throw new GeneralException(__('exceptions.backend.metas.already_exist'));
51 51
         }
52 52
 
53
-        if (! $meta->save()) {
53
+        if (!$meta->save()) {
54 54
             throw new GeneralException(__('exceptions.backend.metas.create'));
55 55
         }
56 56
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             }
77 77
         }
78 78
 
79
-        if (! $meta->update($input)) {
79
+        if (!$meta->update($input)) {
80 80
             throw new GeneralException(__('exceptions.backend.metas.update'));
81 81
         }
82 82
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      */
93 93
     public function destroy(Meta $meta)
94 94
     {
95
-        if (! $meta->delete()) {
95
+        if (!$meta->delete()) {
96 96
             throw new GeneralException(__('exceptions.backend.metas.delete'));
97 97
         }
98 98
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public function batchDestroy(array $ids)
110 110
     {
111
-        DB::transaction(function () use ($ids) {
111
+        DB::transaction(function() use ($ids) {
112 112
             // This wont call eloquent events, change to destroy if needed
113 113
             if ($this->query()->whereIn('id', $ids)->delete()) {
114 114
                 return true;
Please login to merge, or discard this patch.