@@ -15,12 +15,11 @@ |
||
| 15 | 15 | public function __construct(?callable $errorFormatter = null) |
| 16 | 16 | { |
| 17 | 17 | $this->isAsAsserted = IsAsAsserted::withAssertionAndErrorFormatter( |
| 18 | - function ($data) { |
|
| 18 | + function($data) { |
|
| 19 | 19 | return null === $data; |
| 20 | 20 | }, |
| 21 | 21 | is_callable($errorFormatter) ? |
| 22 | - $errorFormatter : |
|
| 23 | - function ($data) { |
|
| 22 | + $errorFormatter : function($data) { |
|
| 24 | 23 | return [self::NOT_NULL]; |
| 25 | 24 | } |
| 26 | 25 | ); |
@@ -17,8 +17,7 @@ |
||
| 17 | 17 | $this->isAsAsserted = IsAsAsserted::withAssertionAndErrorFormatter( |
| 18 | 18 | 'is_float', |
| 19 | 19 | is_callable($errorFormatter) ? |
| 20 | - $errorFormatter : |
|
| 21 | - function ($data) { |
|
| 20 | + $errorFormatter : function($data) { |
|
| 22 | 21 | return [self::NOT_A_FLOAT]; |
| 23 | 22 | } |
| 24 | 23 | ); |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | protected static function withTranslatorAndMessage(Translator $translator, string $message) |
| 30 | 30 | { |
| 31 | - return new static(function ($data) use ($translator, $message) { |
|
| 31 | + return new static(function($data) use ($translator, $message) { |
|
| 32 | 32 | return [$translator->translate($message)]; |
| 33 | 33 | }); |
| 34 | 34 | } |
@@ -15,12 +15,11 @@ |
||
| 15 | 15 | public function __construct(?callable $errorFormatter = null) |
| 16 | 16 | { |
| 17 | 17 | $this->isAsAsserted = IsAsAsserted::withAssertionAndErrorFormatter( |
| 18 | - function ($data) { |
|
| 18 | + function($data) { |
|
| 19 | 19 | return !empty($data); |
| 20 | 20 | }, |
| 21 | 21 | is_callable($errorFormatter) ? |
| 22 | - $errorFormatter : |
|
| 23 | - function ($data) { |
|
| 22 | + $errorFormatter : function($data) { |
|
| 24 | 23 | return [self::EMPTY]; |
| 25 | 24 | } |
| 26 | 25 | ); |