Passed
Push — master ( feee53...6160a4 )
by Innocent
10:45
created
src/Models/Ministry.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     use ManyMinistryUsers;
25 25
     use CreatableTrait;
26 26
 
27
-    protected $guarded = ['id'];
27
+    protected $guarded = [ 'id' ];
28 28
     public $incrementing = false;
29 29
     protected $hidden = [
30 30
         'password',
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
     function getJWTCustomClaims()
41 41
     {
42
-        return [];
42
+        return [ ];
43 43
     }
44 44
 
45 45
     /**
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             $phones = $this->profile->phones;
105 105
             array_unshift($phones, $this->phone);
106 106
             return $phones;
107
-        } else return [$this->phone];
107
+        } else return [ $this->phone ];
108 108
     }
109 109
 
110 110
     function getEmailsAttribute()
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             $emails = $this->profile->emails;
114 114
             array_unshift($emails, $this->email);
115 115
             return $emails;
116
-        } else return [$this->email];
116
+        } else return [ $this->email ];
117 117
     }
118 118
 
119 119
     /**
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,7 +104,9 @@  discard block
 block discarded – undo
104 104
             $phones = $this->profile->phones;
105 105
             array_unshift($phones, $this->phone);
106 106
             return $phones;
107
-        } else return [$this->phone];
107
+        } else {
108
+            return [$this->phone];
109
+        }
108 110
     }
109 111
 
110 112
     function getEmailsAttribute()
@@ -113,7 +115,9 @@  discard block
 block discarded – undo
113 115
             $emails = $this->profile->emails;
114 116
             array_unshift($emails, $this->email);
115 117
             return $emails;
116
-        } else return [$this->email];
118
+        } else {
119
+            return [$this->email];
120
+        }
117 121
     }
118 122
 
119 123
     /**
Please login to merge, or discard this patch.
src/Models/UuidModel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@
 block discarded – undo
18 18
     protected static function boot()
19 19
     {
20 20
         parent::boot();
21
-        self::creating(function ($user) {
22
-            $user->id = str_shuffle((string) Str::uuid());
21
+        self::creating(function($user) {
22
+            $user->id = str_shuffle((string)Str::uuid());
23 23
         });
24 24
     }
25 25
 }
Please login to merge, or discard this patch.
src/Observers/MinistryObserver.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,9 @@
 block discarded – undo
60 60
     public function deleted(Ministry $ministry)
61 61
     {
62 62
         //todo remove aa lotta staff related to this ministry
63
-        if ($ministry->image()->exists())
64
-            $ministry->image()->delete();
63
+        if ($ministry->image()->exists()) {
64
+                    $ministry->image()->delete();
65
+        }
65 66
 
66 67
         try {
67 68
             $this->deleteFiles($ministry);
Please login to merge, or discard this patch.
src/Observers/UserObserver.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,11 +30,12 @@  discard block
 block discarded – undo
30 30
 
31 31
     public function created(User $user)
32 32
     {
33
-        if (request()->has('image'))
34
-            UploadImage::withChain([
33
+        if (request()->has('image')) {
34
+                    UploadImage::withChain([
35 35
                 new ProcessImage($user),
36 36
                 new S3Upload($user)
37 37
             ])->dispatch($user, request('image'));
38
+        }
38 39
     }
39 40
 
40 41
     /**
@@ -62,8 +63,9 @@  discard block
 block discarded – undo
62 63
      */
63 64
     public function deleted(User $user)
64 65
     {
65
-        if ($user->image()->exists())
66
-            $this->deleteFiles($user);
66
+        if ($user->image()->exists()) {
67
+                    $this->deleteFiles($user);
68
+        }
67 69
     }
68 70
 
69 71
     /**
Please login to merge, or discard this patch.
src/Notifications/Ministry/ForgotPassword.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      */
35 35
     public function via($notifiable)
36 36
     {
37
-        return ['mail'];
37
+        return [ 'mail' ];
38 38
     }
39 39
 
40 40
     /**
Please login to merge, or discard this patch.
src/Notifications/Ministry/AccountActivated.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      */
36 36
     public function via($notifiable)
37 37
     {
38
-        return ['mail'];
38
+        return [ 'mail' ];
39 39
     }
40 40
 
41 41
     /**
Please login to merge, or discard this patch.
src/Notifications/Ministry/AccountCreated.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function via($notifiable)
37 37
     {
38
-        return ['mail'];
38
+        return [ 'mail' ];
39 39
     }
40 40
 
41 41
     /**
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public function toMail($notifiable)
48 48
     {
49
-        $url = url('/auth/activate/'.$this->ministry->id . '/' . $this->ministry->activation->code);
49
+        $url = url('/auth/activate/' . $this->ministry->id . '/' . $this->ministry->activation->code);
50 50
 
51 51
         return (new MailMessage)
52 52
             ->greeting('Hello ' . $this->ministry->name)
Please login to merge, or discard this patch.
src/Jobs/Users/UploadImage.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,10 +46,11 @@
 block discarded – undo
46 46
     public function handle(ImageManager $imageManager)
47 47
     {
48 48
         if ($this->image) {
49
-            if ($this->user->image()->exists())
50
-                $fileName = $this->user->image->name;
51
-            else
52
-                $fileName = str_shuffle($this->user->id . time() . time()) . '.png';
49
+            if ($this->user->image()->exists()) {
50
+                            $fileName = $this->user->image->name;
51
+            } else {
52
+                            $fileName = str_shuffle($this->user->id . time() . time()) . '.png';
53
+            }
53 54
             $ogSave = storage_path('app/public/users/original/') . $fileName;
54 55
             $imageManager->make($this->image)->save($ogSave);
55 56
             $this->user->image()->updateOrcreate([
Please login to merge, or discard this patch.
src/Jobs/Users/ProcessImage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
             $ogImage = storage_path('app/public/users/original/') . $this->user->image->name;
43 43
             $thumb50 = storage_path('app/public/users/50-50/') . $this->user->image->name;
44 44
 
45
-            $imageManager->make($ogImage)->fit(50, 50, function ($constraint) {
45
+            $imageManager->make($ogImage)->fit(50, 50, function($constraint) {
46 46
                 $constraint->upsize();
47 47
                 $constraint->aspectRatio();
48 48
             }, 'center')->save($thumb50);
Please login to merge, or discard this patch.