Passed
Push — master ( 2b8d14...6f5c26 )
by Innocent
03:47
created
src/Services/ImageService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
      */
34 34
     public function getUnsetFields()
35 35
     {
36
-        return ['image_id'];
36
+        return [ 'image_id' ];
37 37
     }
38 38
 
39 39
     /**
Please login to merge, or discard this patch.
src/Services/ProfileService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      */
31 31
     public function getUnsetFields()
32 32
     {
33
-        return ['name', 'email', 'phone'];
33
+        return [ 'name', 'email', 'phone' ];
34 34
     }
35 35
 
36 36
     /**
Please login to merge, or discard this patch.
src/Listeners/Ministry/Profile/ImageSaved/ProcessImage.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,15 +31,15 @@
 block discarded – undo
31 31
      */
32 32
     public function handle(ImageSaved $event)
33 33
     {
34
-        $ogImage = storage_path('app/public/profile/original/').$event->getImage()->name;
35
-        $thumb100 = storage_path('app/public/profile/100-100/').$event->getImage()->name;
36
-        $thumb50 = storage_path('app/public/profile/50-50/').$event->getImage()->name;
34
+        $ogImage = storage_path('app/public/profile/original/') . $event->getImage()->name;
35
+        $thumb100 = storage_path('app/public/profile/100-100/') . $event->getImage()->name;
36
+        $thumb50 = storage_path('app/public/profile/50-50/') . $event->getImage()->name;
37 37
 
38
-        $this->imageManager->make($ogImage)->fit(100, 100, function ($constraint) {
38
+        $this->imageManager->make($ogImage)->fit(100, 100, function($constraint) {
39 39
             $constraint->upsize();
40 40
             $constraint->aspectRatio();
41 41
         }, 'center')->save($thumb100);
42
-        $this->imageManager->make($ogImage)->fit(50, 50, function ($constraint) {
42
+        $this->imageManager->make($ogImage)->fit(50, 50, function($constraint) {
43 43
             $constraint->upsize();
44 44
             $constraint->aspectRatio();
45 45
         }, 'center')->save($thumb50);
Please login to merge, or discard this patch.
src/Jobs/Users/UploadImage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,9 +48,9 @@
 block discarded – undo
48 48
             if ($this->user->image()->exists()) {
49 49
                 $fileName = $this->user->image->name;
50 50
             } else {
51
-                $fileName = str_shuffle($this->user->id.time().time()).'.png';
51
+                $fileName = str_shuffle($this->user->id . time() . time()) . '.png';
52 52
             }
53
-            $ogSave = storage_path('app/public/users/original/').$fileName;
53
+            $ogSave = storage_path('app/public/users/original/') . $fileName;
54 54
             $imageManager->make($this->image)->save($ogSave);
55 55
             $this->user->image()->updateOrcreate([
56 56
                 'imageable_id' => $this->user->id,
Please login to merge, or discard this patch.
src/Jobs/Users/ProcessImage.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,10 +39,10 @@
 block discarded – undo
39 39
     public function handle(ImageManager $imageManager)
40 40
     {
41 41
         if ($this->user->image()->exists()) {
42
-            $ogImage = storage_path('app/public/users/original/').$this->user->image->name;
43
-            $thumb50 = storage_path('app/public/users/50-50/').$this->user->image->name;
42
+            $ogImage = storage_path('app/public/users/original/') . $this->user->image->name;
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.
src/Traits/ExcludesColumns.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@
 block discarded – undo
11 11
      * @param array $columns
12 12
      * @return mixed
13 13
      */
14
-    public function scopeExclude($query, array $columns = [])
14
+    public function scopeExclude($query, array $columns = [ ])
15 15
     {
16 16
         $tableColumns = $this->getConnection()->getSchemaBuilder()->getColumnListing($this->getTable());
17 17
 
18
-        $requiredColumns = collect($tableColumns)->filter(fn ($column) => ! in_array($column, $columns))->toArray();
18
+        $requiredColumns = collect($tableColumns)->filter(fn($column) => !in_array($column, $columns))->toArray();
19 19
 
20 20
         return $query->select($requiredColumns);
21 21
     }
Please login to merge, or discard this patch.
src/Traits/FileTraits.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,18 +8,18 @@  discard block
 block discarded – undo
8 8
     {
9 9
         $pieces = explode('/', $path);
10 10
 
11
-        return $pieces[count($pieces) - 1];
11
+        return $pieces[ count($pieces) - 1 ];
12 12
     }
13 13
 
14 14
     public function getImage(string $dir, string $imageName, int $dimen = 0)
15 15
     {
16 16
         if ($dimen) {
17
-            $dimen = $dimen.'-'.$dimen.'/';
17
+            $dimen = $dimen . '-' . $dimen . '/';
18 18
         } else {
19 19
             $dimen = 'original/';
20 20
         }
21 21
 
22
-        return storage_path('app/public/'.$dir.'/'.$dimen.$imageName);
22
+        return storage_path('app/public/' . $dir . '/' . $dimen . $imageName);
23 23
     }
24 24
 
25 25
     public function getImages(string $dir, string $fileName)
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
     public function deleteFiles($model)
35 35
     {
36
-        $images = [];
36
+        $images = [ ];
37 37
         foreach ($model->getImageDimensions() as $imageDimension) {
38 38
             if (is_string($model->getFileName())) {
39 39
                 array_push($images, $this->getImage($model->filesDir(), $model->getFileName(), $imageDimension));
Please login to merge, or discard this patch.
src/Traits/ActiveTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 {
10 10
     public function getActiveAttribute($val)
11 11
     {
12
-        return (bool) $val;
12
+        return (bool)$val;
13 13
     }
14 14
 
15 15
     public function scopeActive($query)
Please login to merge, or discard this patch.
routes/api.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -6,26 +6,26 @@
 block discarded – undo
6 6
 use FaithGen\SDK\Http\Controllers\ReviewController;
7 7
 use Illuminate\Support\Facades\Route;
8 8
 
9
-Route::name('ministry.')->prefix('ministry/')->group(function () {
10
-    Route::post('social-link', [MinistryController::class, 'getSocialLink']);
11
-    Route::get('profile', [MinistryController::class, 'getProfile']);
12
-    Route::get('account-type', [MinistryController::class, 'accountType']);
9
+Route::name('ministry.')->prefix('ministry/')->group(function() {
10
+    Route::post('social-link', [ MinistryController::class, 'getSocialLink' ]);
11
+    Route::get('profile', [ MinistryController::class, 'getProfile' ]);
12
+    Route::get('account-type', [ MinistryController::class, 'accountType' ]);
13 13
 });
14 14
 
15
-Route::name('images.')->prefix('images')->group(function () {
16
-    Route::post('comment', [ImageController::class, 'comment']);
17
-    Route::get('comments/{image}', [ImageController::class, 'comments']);
15
+Route::name('images.')->prefix('images')->group(function() {
16
+    Route::post('comment', [ ImageController::class, 'comment' ]);
17
+    Route::get('comments/{image}', [ ImageController::class, 'comments' ]);
18 18
 });
19 19
 
20 20
 Route::prefix('reviews')
21
-    ->group(function () {
22
-        Route::post('', [ReviewController::class, 'sendReview']);
21
+    ->group(function() {
22
+        Route::post('', [ ReviewController::class, 'sendReview' ]);
23 23
     });
24 24
 
25
-if (! config('faithgen-sdk.source')) {
25
+if (!config('faithgen-sdk.source')) {
26 26
     Route::prefix('comments')
27
-        ->group(function () {
28
-            Route::post('presence', [CommentController::class, 'presenceRegister']);
29
-            Route::post('typing', [CommentController::class, 'showTyping']);
27
+        ->group(function() {
28
+            Route::post('presence', [ CommentController::class, 'presenceRegister' ]);
29
+            Route::post('typing', [ CommentController::class, 'showTyping' ]);
30 30
         });
31 31
 }
Please login to merge, or discard this patch.