Completed
Pull Request — feature-laravel-5.4 (#32)
by Kirill
07:18 queued 03:30
created
app/Models/Article.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * For the full copyright and license information, please view the LICENSE
7 7
  * file that was distributed with this source code.
8 8
  */
9
-declare(strict_types=1);
9
+declare(strict_types = 1);
10 10
 
11 11
 namespace App\Models;
12 12
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      * @param  Authenticatable|User|null $user
91 91
      * @return bool
92 92
      */
93
-    public function isAllowedForUser(?Authenticatable $user): bool
93
+    public function isAllowedForUser(? Authenticatable $user) : bool
94 94
     {
95 95
         $isAuthor = $user === null ? false : ($this->user->id === $user->getAuthIdentifier());
96 96
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     public function getImageUrlAttribute(): string
108 108
     {
109
-        return static::DEFAULT_IMAGE_PATH . $this->image;
109
+        return static::DEFAULT_IMAGE_PATH.$this->image;
110 110
     }
111 111
 
112 112
     /**
Please login to merge, or discard this patch.
app/Services/ImageUploader/ImageUploader.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * For the full copyright and license information, please view the LICENSE
7 7
  * file that was distributed with this source code.
8 8
  */
9
-declare(strict_types=1);
9
+declare(strict_types = 1);
10 10
 
11 11
 namespace App\Services\ImageUploader;
12 12
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      * @param  int|null                                    $height
67 67
      * @return $this|AvatarUploader|ImageUploaderInterface
68 68
      */
69
-    public function withSize(?int $width, ?int $height): ImageUploaderInterface
69
+    public function withSize(? int $width, ? int $height) : ImageUploaderInterface
70 70
     {
71 71
         [$this->width, $this->height] = [$width, $height];
72 72
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      */
110 110
     private function getStorageFilename(): string
111 111
     {
112
-        return storage_path(static::TEMP_PATH . '/' . $this->createRandomName());
112
+        return storage_path(static::TEMP_PATH.'/'.$this->createRandomName());
113 113
     }
114 114
 
115 115
     /**
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      */
118 118
     private function createRandomName(): string
119 119
     {
120
-        return md5(random_int(0, PHP_INT_MAX) . microtime());
120
+        return md5(random_int(0, PHP_INT_MAX).microtime());
121 121
     }
122 122
 
123 123
     /**
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
         $this->fireBefore($image);
146 146
 
147
-        $image->resize($this->width, null, function (Constraint $constraint) {
147
+        $image->resize($this->width, null, function(Constraint $constraint) {
148 148
             $constraint->aspectRatio();
149 149
             $constraint->upsize();
150 150
         });
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
      */
168 168
     private function removeTemporaryFileOrFail(string $temporaryFilename): bool
169 169
     {
170
-        if (! $this->removeTemporaryFile($temporaryFilename)) {
170
+        if (!$this->removeTemporaryFile($temporaryFilename)) {
171 171
             throw new FileException("Can not remove temporary file ${temporaryFilename}.");
172 172
         }
173 173
 
@@ -180,6 +180,6 @@  discard block
 block discarded – undo
180 180
      */
181 181
     private function removeTemporaryFile(string $temporaryFilename): bool
182 182
     {
183
-        return @unlink($temporaryFilename) || ! is_file($temporaryFilename);
183
+        return @unlink($temporaryFilename) || !is_file($temporaryFilename);
184 184
     }
185 185
 }
Please login to merge, or discard this patch.
app/Services/ImageUploader/ImageUploaderInterface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  * For the full copyright and license information, please view the LICENSE
6 6
  * file that was distributed with this source code.
7 7
  */
8
-declare(strict_types=1);
8
+declare(strict_types = 1);
9 9
 
10 10
 namespace App\Services\ImageUploader;
11 11
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      * @param  int|null               $height
24 24
      * @return ImageUploaderInterface
25 25
      */
26
-    public function withSize(?int $width, ?int $height): ImageUploaderInterface;
26
+    public function withSize(? int $width, ? int $height) : ImageUploaderInterface;
27 27
 
28 28
     /**
29 29
      * @param  \Closure               $callback
Please login to merge, or discard this patch.