@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | return $this->createWithContent($name, $kilobytes); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - return Helpers::tap(new File($name, tmpfile()), function ($file) use ($kilobytes, $mimeType) { |
|
| 28 | + return Helpers::tap(new File($name, tmpfile()), function($file) use ($kilobytes, $mimeType) { |
|
| 29 | 29 | $file->sizeToReport = $kilobytes * 1024; |
| 30 | 30 | $file->mimeTypeToReport = $mimeType; |
| 31 | 31 | }); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | fwrite($tmpfile, $content); |
| 42 | 42 | |
| 43 | - return Helpers::tap(new File($name, $tmpfile), function ($file) use ($tmpfile) { |
|
| 43 | + return Helpers::tap(new File($name, $tmpfile), function($file) use ($tmpfile) { |
|
| 44 | 44 | $file->sizeToReport = fstat($tmpfile)['size']; |
| 45 | 45 | }); |
| 46 | 46 | } |
@@ -68,11 +68,11 @@ discard block |
||
| 68 | 68 | */ |
| 69 | 69 | protected function generateImage(int $width, int $height, string $extension) |
| 70 | 70 | { |
| 71 | - if (! function_exists('imagecreatetruecolor')) { |
|
| 71 | + if (!function_exists('imagecreatetruecolor')) { |
|
| 72 | 72 | throw new LogicException('GD extension is not installed.'); |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | - return Helpers::tap(tmpfile(), function ($temp) use ($width, $height, $extension) { |
|
| 75 | + return Helpers::tap(tmpfile(), function($temp) use ($width, $height, $extension) { |
|
| 76 | 76 | ob_start(); |
| 77 | 77 | |
| 78 | 78 | $extension = in_array($extension, ['jpeg', 'png', 'gif', 'webp', 'wbmp', 'bmp'], true) |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | |
| 82 | 82 | $image = imagecreatetruecolor($width, $height); |
| 83 | 83 | |
| 84 | - if (! function_exists($functionName = "image{$extension}")) { |
|
| 84 | + if (!function_exists($functionName = "image{$extension}")) { |
|
| 85 | 85 | ob_get_clean(); |
| 86 | 86 | |
| 87 | 87 | throw new LogicException("{$functionName} function is not defined and image cannot be generated."); |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | */ |
| 246 | 246 | public function fails(): bool |
| 247 | 247 | { |
| 248 | - return ! $this->passes(); |
|
| 248 | + return !$this->passes(); |
|
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | /** |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | */ |
| 296 | 296 | public function valid(): array |
| 297 | 297 | { |
| 298 | - if (! $this->validation) { |
|
| 298 | + if (!$this->validation) { |
|
| 299 | 299 | return []; |
| 300 | 300 | } |
| 301 | 301 | |
@@ -321,7 +321,7 @@ discard block |
||
| 321 | 321 | */ |
| 322 | 322 | public function invalid(): array |
| 323 | 323 | { |
| 324 | - if (! $this->validation) { |
|
| 324 | + if (!$this->validation) { |
|
| 325 | 325 | return []; |
| 326 | 326 | } |
| 327 | 327 | |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | */ |
| 346 | 346 | public function errors(): ErrorBag |
| 347 | 347 | { |
| 348 | - if (! $this->validation) { |
|
| 348 | + if (!$this->validation) { |
|
| 349 | 349 | throw new RuntimeException(); |
| 350 | 350 | } |
| 351 | 351 | |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types = 1); |
|
| 1 | +<?php declare(strict_types=1); |
|
| 2 | 2 | |
| 3 | 3 | $ignoreErrors = []; |
| 4 | 4 | $ignoreErrors[] = [ |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function check($value): bool |
| 22 | 22 | { |
| 23 | - if (! is_string($value) && ! is_numeric($value)) { |
|
| 23 | + if (!is_string($value) && !is_numeric($value)) { |
|
| 24 | 24 | return false; |
| 25 | 25 | } |
| 26 | 26 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public function check($value): bool |
| 25 | 25 | { |
| 26 | - if (! is_string($value)) { |
|
| 26 | + if (!is_string($value)) { |
|
| 27 | 27 | return false; |
| 28 | 28 | } |
| 29 | 29 | |
@@ -29,11 +29,11 @@ |
||
| 29 | 29 | $value = (string) $value; |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - if (! is_string($value)) { |
|
| 32 | + if (!is_string($value)) { |
|
| 33 | 33 | return false; |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | - if (! is_numeric($compare = $this->parameter('value'))) { |
|
| 36 | + if (!is_numeric($compare = $this->parameter('value'))) { |
|
| 37 | 37 | $compare = $this->getAttribute()->getValue($compare); |
| 38 | 38 | } |
| 39 | 39 | |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | public function check($value): bool |
| 22 | 22 | { |
| 23 | - if (! is_string($value) && ! is_numeric($value)) { |
|
| 23 | + if (!is_string($value) && !is_numeric($value)) { |
|
| 24 | 24 | return false; |
| 25 | 25 | } |
| 26 | 26 | |
@@ -18,6 +18,6 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | public function check($value): bool |
| 20 | 20 | { |
| 21 | - return ! parent::check($value); |
|
| 21 | + return !parent::check($value); |
|
| 22 | 22 | } |
| 23 | 23 | } |
@@ -35,15 +35,15 @@ |
||
| 35 | 35 | $this->requireParameters($this->fillableParams); |
| 36 | 36 | $time = $this->parameter('time'); |
| 37 | 37 | |
| 38 | - if (! $this->isValidDate($value)) { |
|
| 38 | + if (!$this->isValidDate($value)) { |
|
| 39 | 39 | throw $this->throwException($value); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - if (! $this->isValidDate($time)) { |
|
| 42 | + if (!$this->isValidDate($time)) { |
|
| 43 | 43 | $time = $this->getAttribute()->getValue($time); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - if (! $this->isValidDate($time)) { |
|
| 46 | + if (!$this->isValidDate($time)) { |
|
| 47 | 47 | throw $this->throwException($time); |
| 48 | 48 | } |
| 49 | 49 | |