@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | $keys = is_array($keys) ? $keys : func_get_args(); |
| 38 | 38 | |
| 39 | 39 | foreach ($keys as $key) { |
| 40 | - if (! Arr::has($this->input, $key)) { |
|
| 40 | + if (!Arr::has($this->input, $key)) { |
|
| 41 | 41 | return false; |
| 42 | 42 | } |
| 43 | 43 | } |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | { |
| 53 | 53 | $keys = is_array($keys) ? $keys : func_get_args(); |
| 54 | 54 | |
| 55 | - return ! $this->has($keys); |
|
| 55 | + return !$this->has($keys); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
@@ -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[] = [ |
@@ -2,34 +2,34 @@ |
||
| 2 | 2 | |
| 3 | 3 | $ignoreErrors = []; |
| 4 | 4 | $ignoreErrors[] = [ |
| 5 | - 'message' => '#^Unsafe usage of new static\\(\\)\\.$#', |
|
| 6 | - 'count' => 1, |
|
| 7 | - 'path' => __DIR__ . '/src/ErrorBag.php', |
|
| 5 | + 'message' => '#^Unsafe usage of new static\\(\\)\\.$#', |
|
| 6 | + 'count' => 1, |
|
| 7 | + 'path' => __DIR__ . '/src/ErrorBag.php', |
|
| 8 | 8 | ]; |
| 9 | 9 | $ignoreErrors[] = [ |
| 10 | - 'message' => '#^Method Dimtrovich\\\\Validation\\\\Rules\\\\File\\:\\:defaults\\(\\) should return static\\(Dimtrovich\\\\Validation\\\\Rules\\\\File\\)\\|null but return statement is missing\\.$#', |
|
| 11 | - 'count' => 1, |
|
| 12 | - 'path' => __DIR__ . '/src/Rules/File.php', |
|
| 10 | + 'message' => '#^Method Dimtrovich\\\\Validation\\\\Rules\\\\File\\:\\:defaults\\(\\) should return static\\(Dimtrovich\\\\Validation\\\\Rules\\\\File\\)\\|null but return statement is missing\\.$#', |
|
| 11 | + 'count' => 1, |
|
| 12 | + 'path' => __DIR__ . '/src/Rules/File.php', |
|
| 13 | 13 | ]; |
| 14 | 14 | $ignoreErrors[] = [ |
| 15 | - 'message' => '#^Unsafe usage of new static\\(\\)\\.$#', |
|
| 16 | - 'count' => 2, |
|
| 17 | - 'path' => __DIR__ . '/src/Rules/File.php', |
|
| 15 | + 'message' => '#^Unsafe usage of new static\\(\\)\\.$#', |
|
| 16 | + 'count' => 2, |
|
| 17 | + 'path' => __DIR__ . '/src/Rules/File.php', |
|
| 18 | 18 | ]; |
| 19 | 19 | $ignoreErrors[] = [ |
| 20 | - 'message' => '#^Binary operation "\\*" between string and 2 results in an error\\.$#', |
|
| 21 | - 'count' => 1, |
|
| 22 | - 'path' => __DIR__ . '/src/Rules/Imei.php', |
|
| 20 | + 'message' => '#^Binary operation "\\*" between string and 2 results in an error\\.$#', |
|
| 21 | + 'count' => 1, |
|
| 22 | + 'path' => __DIR__ . '/src/Rules/Imei.php', |
|
| 23 | 23 | ]; |
| 24 | 24 | $ignoreErrors[] = [ |
| 25 | - 'message' => '#^Unsafe usage of new static\\(\\)\\.$#', |
|
| 26 | - 'count' => 2, |
|
| 27 | - 'path' => __DIR__ . '/src/Rules/Postalcode.php', |
|
| 25 | + 'message' => '#^Unsafe usage of new static\\(\\)\\.$#', |
|
| 26 | + 'count' => 2, |
|
| 27 | + 'path' => __DIR__ . '/src/Rules/Postalcode.php', |
|
| 28 | 28 | ]; |
| 29 | 29 | $ignoreErrors[] = [ |
| 30 | - 'message' => '#^Unsafe usage of new static\\(\\)\\.$#', |
|
| 31 | - 'count' => 1, |
|
| 32 | - 'path' => __DIR__ . '/src/Validation.php', |
|
| 30 | + 'message' => '#^Unsafe usage of new static\\(\\)\\.$#', |
|
| 31 | + 'count' => 1, |
|
| 32 | + 'path' => __DIR__ . '/src/Validation.php', |
|
| 33 | 33 | ]; |
| 34 | 34 | |
| 35 | 35 | return ['parameters' => ['ignoreErrors' => $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 | } |