Completed
Push — master ( 12ce9b...85cdc9 )
by Sebastian
33:43 queued 28:34
created
app/Http/Controllers/Back/Updaters/UpdateTranslations.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
             foreach ($model->getTranslatableAttributes() as $fieldName) {
14 14
                 $translatedFieldName = translate_field_name($fieldName, $locale);
15 15
 
16
-                if (! $request->has($translatedFieldName)) {
16
+                if (!$request->has($translatedFieldName)) {
17 17
                     continue;
18 18
                 }
19 19
 
Please login to merge, or discard this patch.
app/Http/Controllers/Back/Api/MediaLibraryController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,12 +20,12 @@  discard block
 block discarded – undo
20 20
 
21 21
         $files = $request->file('file');
22 22
 
23
-        if (! is_array($files)) {
23
+        if (!is_array($files)) {
24 24
             $files = [$files];
25 25
         }
26 26
 
27 27
         $media = collect($files)
28
-            ->map(function (UploadedFile $file) use ($model, $request) {
28
+            ->map(function(UploadedFile $file) use ($model, $request) {
29 29
                 return $model
30 30
                     ->addMedia($file)
31 31
                     ->withCustomProperties(['temp' => $request->has('redactor') ? false : true])
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
         $collectionName = $request->get('collectionName');
47 47
 
48
-        $media = $model->getMedia($collectionName)->reduce(function (Collection $collection, Media $media) {
48
+        $media = $model->getMedia($collectionName)->reduce(function(Collection $collection, Media $media) {
49 49
             return $collection->push([
50 50
                 'thumb' => $media->getUrl('admin'),
51 51
                 'image' => $media->getUrl('redactor'),
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
 
59 59
     protected function getModelFromRequest(Request $request)
60 60
     {
61
-        if (! isset($request['model_name'])) {
61
+        if (!isset($request['model_name'])) {
62 62
             throw new Exception('No model name provided');
63 63
         }
64 64
 
65
-        if (! isset($request['model_id'])) {
65
+        if (!isset($request['model_id'])) {
66 66
             throw new Exception('No model id provided');
67 67
         }
68 68
 
Please login to merge, or discard this patch.
app/Http/Controllers/Back/TagsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
 
25 25
     public function index()
26 26
     {
27
-        $tags = Tag::nonDraft()->get()->reduce(function (Collection $carry, Tag $tag) {
28
-            if (! $carry->has($tag->type)) {
27
+        $tags = Tag::nonDraft()->get()->reduce(function(Collection $carry, Tag $tag) {
28
+            if (!$carry->has($tag->type)) {
29 29
                 $carry->put($tag->type, new Collection());
30 30
             }
31 31
 
Please login to merge, or discard this patch.
app/Http/Controllers/Back/MembersController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
     {
59 59
         $user = $this->frontUserRepository->find($id);
60 60
 
61
-        if (! $user) {
61
+        if (!$user) {
62 62
             abort(404);
63 63
         }
64 64
 
Please login to merge, or discard this patch.
app/Http/Controllers/Front/Api/NewsletterController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
         $result = Newsletter::subscribe($email);
29 29
 
30
-        if (! $result) {
30
+        if (!$result) {
31 31
             return $this->respondWithBadRequest(['message' => fragment('newsletter.subscription.result.error'), 'type' => 'error']);
32 32
         }
33 33
 
Please login to merge, or discard this patch.
app/Http/Middleware/LoginAs.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
             return $next($request);
19 19
         }
20 20
 
21
-        if (! $this->canLoginAs()) {
21
+        if (!$this->canLoginAs()) {
22 22
             throw new Exception("You can't log in as a specific user right now");
23 23
         }
24 24
 
@@ -29,15 +29,15 @@  discard block
 block discarded – undo
29 29
     {
30 30
         // Just to be sure...
31 31
 
32
-        if (! app()->environment('local')) {
32
+        if (!app()->environment('local')) {
33 33
             return false;
34 34
         }
35 35
 
36
-        if (! ends_with(request()->getHost(), '.dev')) {
36
+        if (!ends_with(request()->getHost(), '.dev')) {
37 37
             return false;
38 38
         }
39 39
 
40
-        if (! in_array(env('DB_USERNAME'), ['homestead', 'root'])) {
40
+        if (!in_array(env('DB_USERNAME'), ['homestead', 'root'])) {
41 41
             return false;
42 42
         }
43 43
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
     protected function getUser(string $identifier): Authenticatable
63 63
     {
64
-        if (! str_contains($identifier, '@')) {
64
+        if (!str_contains($identifier, '@')) {
65 65
             $identifier .= '@spatie.be';
66 66
         }
67 67
 
Please login to merge, or discard this patch.
app/Foundation/Repositories/Repository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 
70 70
         $locale = content_locale();
71 71
 
72
-        if (! isset((new $model())->translatedAttributes)) {
72
+        if (!isset((new $model())->translatedAttributes)) {
73 73
             return $this->query()
74 74
                 ->online()
75 75
                 ->where('url', 'regexp', "\"{$locale}\"\s*:\s*\"{$url}\"")
Please login to merge, or discard this patch.
app/Foundation/helpers.php 1 patch
Spacing   +6 added lines, -8 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
  */
36 36
 function current_front_user()
37 37
 {
38
-    if (! auth()->guard('front')->check()) {
38
+    if (!auth()->guard('front')->check()) {
39 39
         return;
40 40
     }
41 41
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
  */
48 48
 function current_back_user()
49 49
 {
50
-    if (! auth()->guard('back')->check()) {
50
+    if (!auth()->guard('back')->check()) {
51 51
         return;
52 52
     }
53 53
 
@@ -89,15 +89,13 @@  discard block
 block discarded – undo
89 89
 function login_url(): string
90 90
 {
91 91
     return request()->isFront() ?
92
-        action('Front\Auth\LoginController@showLoginForm') :
93
-        action('Back\Auth\LoginController@showLoginForm');
92
+        action('Front\Auth\LoginController@showLoginForm') : action('Back\Auth\LoginController@showLoginForm');
94 93
 }
95 94
 
96 95
 function logout_url(): string
97 96
 {
98 97
     return request()->isFront() ?
99
-        action('Front\Auth\LoginController@logout') :
100
-        action('Back\Auth\LoginController@logout');
98
+        action('Front\Auth\LoginController@logout') : action('Back\Auth\LoginController@logout');
101 99
 }
102 100
 
103 101
 function roman_year(int $year = null): string
@@ -158,11 +156,11 @@  discard block
 block discarded – undo
158 156
  */
159 157
 function validate($fields, $rules): bool
160 158
 {
161
-    if (! is_array($fields)) {
159
+    if (!is_array($fields)) {
162 160
         $fields = ['default' => $fields];
163 161
     }
164 162
 
165
-    if (! is_array($rules)) {
163
+    if (!is_array($rules)) {
166 164
         $rules = ['default' => $rules];
167 165
     }
168 166
 
Please login to merge, or discard this patch.
app/Foundation/Models/Traits/HasMedia.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      */
18 18
     protected function updateMediaLibraryFields($attributes)
19 19
     {
20
-        if (! isset($this->mediaLibraryCollections)) {
20
+        if (!isset($this->mediaLibraryCollections)) {
21 21
             return;
22 22
         }
23 23
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
     public function clearTemporaryMedia()
36 36
     {
37
-        $this->media()->get()->each(function (Media $media) {
37
+        $this->media()->get()->each(function(Media $media) {
38 38
             if ($media->getCustomProperty('temp', false) === true) {
39 39
                 $media->delete();
40 40
             }
Please login to merge, or discard this patch.