@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | // Get the image dimension info, or fail. |
44 | 44 | |
45 | 45 | $image_size = @getimagesize($image); |
46 | - if ($image_size === false) { |
|
46 | + if ($image_size===false) { |
|
47 | 47 | return false; |
48 | 48 | } |
49 | 49 | |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | // Get the image dimension info, or fail. |
107 | 107 | |
108 | 108 | $image_size = @getimagesize($image); |
109 | - if ($image_size === false) { |
|
109 | + if ($image_size===false) { |
|
110 | 110 | return false; |
111 | 111 | } |
112 | 112 | |
@@ -124,12 +124,12 @@ discard block |
||
124 | 124 | |
125 | 125 | $both_orientations = false; |
126 | 126 | |
127 | - if (substr($parameters[0], 0, 1) === '~') { |
|
127 | + if (substr($parameters[0], 0, 1)==='~') { |
|
128 | 128 | $parameters[0] = substr($parameters[0], 1); |
129 | 129 | $both_orientations = true; |
130 | 130 | } |
131 | 131 | |
132 | - if (count($parameters) === 1) { |
|
132 | + if (count($parameters)===1) { |
|
133 | 133 | $aspect_width = $parameters[0]; |
134 | 134 | $aspect_height = 1; |
135 | 135 | } else { |
@@ -137,19 +137,19 @@ discard block |
||
137 | 137 | $aspect_height = (int) $parameters[1]; |
138 | 138 | } |
139 | 139 | |
140 | - if ($aspect_width === 0 || $aspect_height === 0) { |
|
140 | + if ($aspect_width===0 || $aspect_height===0) { |
|
141 | 141 | throw new RuntimeException('Aspect is zero or infinite: ' . $parameters[0]); |
142 | 142 | } |
143 | 143 | |
144 | 144 | $check = ($image_width * $aspect_height) / $aspect_width; |
145 | 145 | |
146 | - if ((int) round($check) === $image_height) { |
|
146 | + if ((int) round($check)===$image_height) { |
|
147 | 147 | return true; |
148 | 148 | } |
149 | 149 | |
150 | 150 | if ($both_orientations) { |
151 | 151 | $check = ($image_width * $aspect_width) / $aspect_height; |
152 | - if ((int) round($check) === $image_height) { |
|
152 | + if ((int) round($check)===$image_height) { |
|
153 | 153 | return true; |
154 | 154 | } |
155 | 155 | } |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | |
185 | 185 | $dimension = (int) $dimension; |
186 | 186 | |
187 | - if ($rule === '*') { |
|
187 | + if ($rule==='*') { |
|
188 | 188 | $message = $this->translator->trans('image-validator::validation.anysize'); |
189 | 189 | $pass = true; |
190 | 190 | } else if (preg_match('/^(\d+)\-(\d+)$/', $rule, $matches)) { |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | case '=': |
218 | 218 | case '': |
219 | 219 | $message = $this->translator->trans('image-validator::validation.equal', compact('size')); |
220 | - $pass = $dimension == $size; |
|
220 | + $pass = $dimension==$size; |
|
221 | 221 | break; |
222 | 222 | default: |
223 | 223 | throw new RuntimeException('Unknown image size validation rule: ' . $rule); |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | } |
242 | 242 | |
243 | 243 | // if we're passed a PHP file upload array, return the "tmp_name" |
244 | - if (is_array($value) && array_get($value, 'tmp_name') !== null) { |
|
244 | + if (is_array($value) && array_get($value, 'tmp_name')!==null) { |
|
245 | 245 | return $value['tmp_name']; |
246 | 246 | } |
247 | 247 |