@@ -6,7 +6,7 @@ discard block |
||
| 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; |
| 12 | 12 | |
@@ -22,9 +22,9 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | public function make(bool $withPrefix = true): string |
| 24 | 24 | { |
| 25 | - return ($withPrefix ? '#' : '') . |
|
| 26 | - strtolower(sprintf('%02X', $this->createDarkColor())) . |
|
| 27 | - strtolower(sprintf('%02X', $this->createDarkColor())) . |
|
| 25 | + return ($withPrefix ? '#' : ''). |
|
| 26 | + strtolower(sprintf('%02X', $this->createDarkColor())). |
|
| 27 | + strtolower(sprintf('%02X', $this->createDarkColor())). |
|
| 28 | 28 | strtolower(sprintf('%02X', $this->createDarkColor())); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -6,7 +6,7 @@ |
||
| 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\ContentRenderer; |
| 12 | 12 | |
@@ -6,7 +6,7 @@ discard block |
||
| 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 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | public function upload(ImageResolverInterface $resolver, Filesystem $fs, bool $removeTempFile = true): Promise |
| 64 | 64 | { |
| 65 | 65 | return parent::upload($resolver, $fs, $removeTempFile) |
| 66 | - ->then(function (string $path) { |
|
| 66 | + ->then(function(string $path) { |
|
| 67 | 67 | $this->user->avatar = $path; |
| 68 | 68 | $this->user->save(); |
| 69 | 69 | |
@@ -5,7 +5,7 @@ |
||
| 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\Resolvers; |
| 11 | 11 | |
@@ -5,7 +5,7 @@ discard block |
||
| 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 | |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | * |
| 25 | 25 | * @return ImageUploaderInterface |
| 26 | 26 | */ |
| 27 | - public function withSize(?int $width, ?int $height): ImageUploaderInterface; |
|
| 27 | + public function withSize(? int $width, ? int $height) : ImageUploaderInterface; |
|
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * @param \Closure $callback |
@@ -5,7 +5,7 @@ |
||
| 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\Support; |
| 11 | 11 | |
@@ -6,7 +6,7 @@ discard block |
||
| 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 | |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | * |
| 68 | 68 | * @return $this|AvatarUploader|ImageUploaderInterface |
| 69 | 69 | */ |
| 70 | - public function withSize(?int $width, ?int $height): ImageUploaderInterface |
|
| 70 | + public function withSize(? int $width, ? int $height) : ImageUploaderInterface |
|
| 71 | 71 | { |
| 72 | 72 | [$this->width, $this->height] = [$width, $height]; |
| 73 | 73 | |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | */ |
| 112 | 112 | private function getStorageFilename(): string |
| 113 | 113 | { |
| 114 | - return storage_path(static::TEMP_PATH . '/' . $this->createRandomName()); |
|
| 114 | + return storage_path(static::TEMP_PATH.'/'.$this->createRandomName()); |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | /** |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | */ |
| 120 | 120 | private function createRandomName(): string |
| 121 | 121 | { |
| 122 | - return md5(random_int(0, PHP_INT_MAX) . microtime()); |
|
| 122 | + return md5(random_int(0, PHP_INT_MAX).microtime()); |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | /** |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | |
| 148 | 148 | $this->fireBefore($image); |
| 149 | 149 | |
| 150 | - $image->resize($this->width, null, function (Constraint $constraint) { |
|
| 150 | + $image->resize($this->width, null, function(Constraint $constraint) { |
|
| 151 | 151 | $constraint->aspectRatio(); |
| 152 | 152 | $constraint->upsize(); |
| 153 | 153 | }); |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | */ |
| 172 | 172 | private function removeTemporaryFileOrFail(string $temporaryFilename): bool |
| 173 | 173 | { |
| 174 | - if (! $this->removeTemporaryFile($temporaryFilename)) { |
|
| 174 | + if (!$this->removeTemporaryFile($temporaryFilename)) { |
|
| 175 | 175 | throw new FileException("Can not remove temporary file ${temporaryFilename}."); |
| 176 | 176 | } |
| 177 | 177 | |
@@ -185,6 +185,6 @@ discard block |
||
| 185 | 185 | */ |
| 186 | 186 | private function removeTemporaryFile(string $temporaryFilename): bool |
| 187 | 187 | { |
| 188 | - return @unlink($temporaryFilename) || ! is_file($temporaryFilename); |
|
| 188 | + return @unlink($temporaryFilename) || !is_file($temporaryFilename); |
|
| 189 | 189 | } |
| 190 | 190 | } |
@@ -172,7 +172,7 @@ |
||
| 172 | 172 | private function removeTemporaryFileOrFail(string $temporaryFilename): bool |
| 173 | 173 | { |
| 174 | 174 | if (! $this->removeTemporaryFile($temporaryFilename)) { |
| 175 | - throw new FileException("Can not remove temporary file ${temporaryFilename}."); |
|
| 175 | + throw new FileException("Can not remove temporary file ${temporaryfilename}."); |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | return true; |
@@ -6,7 +6,7 @@ discard block |
||
| 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\Console\Commands; |
| 12 | 12 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | public function handle(): void |
| 37 | 37 | { |
| 38 | - if (! $this->laravel->getProvider(IdeHelperServiceProvider::class)) { |
|
| 38 | + if (!$this->laravel->getProvider(IdeHelperServiceProvider::class)) { |
|
| 39 | 39 | $env = $this->laravel->environment(); |
| 40 | 40 | $this->info(sprintf('Skipped. IdeHelper not registered for %s environment.', $env)); |
| 41 | 41 | |
@@ -6,7 +6,7 @@ |
||
| 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\Console; |
| 12 | 12 | |