@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | $this->resizeImage($this->width, $this->height, $this->alwaysPreserveAspectRatio); |
42 | 42 | |
43 | - if (! $this->doNotCreateDerivativeImages) { |
|
43 | + if (!$this->doNotCreateDerivativeImages) { |
|
44 | 44 | $job = (new RenderDerivativeImages($this->source))->onQueue('imagery'); |
45 | 45 | dispatch($job); |
46 | 46 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | protected function resizeImage(int $width, int $height, bool $alwaysPreserveAspect = false) |
50 | 50 | { |
51 | - if (! $height || ! $width) { |
|
51 | + if (!$height || !$width) { |
|
52 | 52 | $height = $height ?: $this->image->getHeight(); |
53 | 53 | $width = $width ?: $this->image->getWidth(); |
54 | 54 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $height = $this->determineHeight($height, $screenHeight); |
61 | 61 | $width = $this->determineWidth($width, $screenWidth); |
62 | 62 | |
63 | - if (! $height && ! $width) { |
|
63 | + if (!$height && !$width) { |
|
64 | 64 | $height = $this->image->height(); |
65 | 65 | $width = $this->image->width(); |
66 | 66 | } |
@@ -68,8 +68,8 @@ discard block |
||
68 | 68 | $maxHeight = $this->determineMaxHeight($height, $screenHeight, $screenWidth); |
69 | 69 | $maxWidth = $this->determineMaxWidth($width, $screenHeight, $screenWidth); |
70 | 70 | |
71 | - $this->image->resize($maxWidth, $maxHeight, function ($constraint) use ($alwaysPreserveAspect) { |
|
72 | - if ($alwaysPreserveAspect || ! $width || ! $height) { |
|
71 | + $this->image->resize($maxWidth, $maxHeight, function($constraint) use ($alwaysPreserveAspect) { |
|
72 | + if ($alwaysPreserveAspect || !$width || !$height) { |
|
73 | 73 | $constraint->aspectRatio(); |
74 | 74 | } |
75 | 75 | |
@@ -84,13 +84,13 @@ discard block |
||
84 | 84 | //TODO: refactor to have a single return type, instead of null or int |
85 | 85 | protected function determineMaxHeight($height, $screenHeight, $screenWidth) |
86 | 86 | { |
87 | - if (! $screenHeight || ! $screenWidth) { |
|
87 | + if (!$screenHeight || !$screenWidth) { |
|
88 | 88 | return $height; |
89 | 89 | } |
90 | 90 | |
91 | 91 | $maxHeight = $height ?: $this->image->height(); |
92 | 92 | |
93 | - if (! $this->overrideScreenConstraint) { |
|
93 | + if (!$this->overrideScreenConstraint) { |
|
94 | 94 | $maxHeight = $screenHeight < $maxHeight ? $screenHeight : $maxHeight; |
95 | 95 | |
96 | 96 | if ($this->screenConstraintMethod === 'cover') { |
@@ -109,13 +109,13 @@ discard block |
||
109 | 109 | //TODO: refactor to have a single return type, instead of null or int |
110 | 110 | protected function determineMaxWidth($width, $screenHeight, $screenWidth) |
111 | 111 | { |
112 | - if (! $screenHeight || ! $screenWidth) { |
|
112 | + if (!$screenHeight || !$screenWidth) { |
|
113 | 113 | return $width; |
114 | 114 | } |
115 | 115 | |
116 | 116 | $maxWidth = $width ?: $this->image->width(); |
117 | 117 | |
118 | - if (! $this->overrideScreenConstraint) { |
|
118 | + if (!$this->overrideScreenConstraint) { |
|
119 | 119 | $maxWidth = $screenWidth < $maxWidth ? $screenWidth : $maxWidth; |
120 | 120 | |
121 | 121 | if ($this->screenConstraintMethod === 'cover') { |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | $scriptUrl = mix('js/cookie.js', 'genealabs-laravel-imagery'); |
179 | 179 | $attributes = ''; |
180 | 180 | |
181 | - $attributes = $this->htmlAttributes->map(function ($value, $attribute) use (&$attributes) { |
|
181 | + $attributes = $this->htmlAttributes->map(function($value, $attribute) use (&$attributes) { |
|
182 | 182 | return " {$attribute}=\"{$value}\""; |
183 | 183 | })->implode(''); |
184 | 184 | |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | { |
237 | 237 | app('filesystem')->disk('public')->makeDirectory(config('genealabs-laravel-imagery.storage-folder')); |
238 | 238 | |
239 | - if (! file_exists(public_path(config('genealabs-laravel-imagery.storage-folder')))) { |
|
239 | + if (!file_exists(public_path(config('genealabs-laravel-imagery.storage-folder')))) { |
|
240 | 240 | symlink( |
241 | 241 | rtrim(storage_path('app/public/' . config('genealabs-laravel-imagery.storage-folder')), '/'), |
242 | 242 | rtrim(public_path(config('genealabs-laravel-imagery.storage-folder')), '/') |