@@ -17,8 +17,7 @@ |
||
| 17 | 17 | $this->isAsAsserted = IsAsAsserted::withAssertionAndErrorFormatter( |
| 18 | 18 | 'is_callable', |
| 19 | 19 | is_callable($errorFormatter) ? |
| 20 | - $errorFormatter : |
|
| 21 | - function ($data) { |
|
| 20 | + $errorFormatter : function($data) { |
|
| 22 | 21 | return [self::NOT_A_CALLABLE]; |
| 23 | 22 | } |
| 24 | 23 | ); |
@@ -18,8 +18,7 @@ |
||
| 18 | 18 | $this->isAsAsserted = IsAsAsserted::withAssertionAndErrorFormatter( |
| 19 | 19 | 'is_bool', |
| 20 | 20 | is_callable($errorFormatter) ? |
| 21 | - $errorFormatter : |
|
| 22 | - function ($data) { |
|
| 21 | + $errorFormatter : function($data) { |
|
| 23 | 22 | return [self::NOT_A_BOOL]; |
| 24 | 23 | } |
| 25 | 24 | ); |
@@ -18,8 +18,7 @@ |
||
| 18 | 18 | $this->isAsAsserted = IsAsAsserted::withAssertionAndErrorFormatter( |
| 19 | 19 | 'is_int', |
| 20 | 20 | is_callable($errorFormatter) ? |
| 21 | - $errorFormatter : |
|
| 22 | - function ($data) { |
|
| 21 | + $errorFormatter : function($data) { |
|
| 23 | 22 | return [self::NOT_AN_INTEGER]; |
| 24 | 23 | } |
| 25 | 24 | ); |
@@ -18,8 +18,7 @@ |
||
| 18 | 18 | $this->isAsAsserted = IsAsAsserted::withAssertionAndErrorFormatter( |
| 19 | 19 | 'is_object', |
| 20 | 20 | is_callable($errorFormatter) ? |
| 21 | - $errorFormatter : |
|
| 22 | - function ($data) { |
|
| 21 | + $errorFormatter : function($data) { |
|
| 23 | 22 | return [self::NOT_AN_OBJECT]; |
| 24 | 23 | } |
| 25 | 24 | ); |
@@ -18,8 +18,7 @@ |
||
| 18 | 18 | $this->isAsAsserted = IsAsAsserted::withAssertionAndErrorFormatter( |
| 19 | 19 | 'is_iterable', |
| 20 | 20 | is_callable($errorFormatter) ? |
| 21 | - $errorFormatter : |
|
| 22 | - function ($data) { |
|
| 21 | + $errorFormatter : function($data) { |
|
| 23 | 22 | return [self::NOT_AN_ITERABLE]; |
| 24 | 23 | } |
| 25 | 24 | ); |
@@ -18,8 +18,7 @@ |
||
| 18 | 18 | $this->isAsAsserted = IsAsAsserted::withAssertionAndErrorFormatter( |
| 19 | 19 | 'is_string', |
| 20 | 20 | is_callable($errorFormatter) ? |
| 21 | - $errorFormatter : |
|
| 22 | - function ($data) { |
|
| 21 | + $errorFormatter : function($data) { |
|
| 23 | 22 | return [self::NOT_A_STRING]; |
| 24 | 23 | } |
| 25 | 24 | ); |
@@ -18,8 +18,7 @@ |
||
| 18 | 18 | $this->isAsAsserted = IsAsAsserted::withAssertionAndErrorFormatter( |
| 19 | 19 | 'is_resource', |
| 20 | 20 | is_callable($errorFormatter) ? |
| 21 | - $errorFormatter : |
|
| 22 | - function ($data) { |
|
| 21 | + $errorFormatter : function($data) { |
|
| 23 | 22 | return [self::NOT_A_RESOURCE]; |
| 24 | 23 | } |
| 25 | 24 | ); |
@@ -16,8 +16,7 @@ |
||
| 16 | 16 | $this->isAsAsserted = IsAsAsserted::withAssertionAndErrorFormatter( |
| 17 | 17 | 'is_array', |
| 18 | 18 | is_callable($errorFormatter) ? |
| 19 | - $errorFormatter : |
|
| 20 | - function ($data) { |
|
| 19 | + $errorFormatter : function($data) { |
|
| 21 | 20 | return [self::NOT_AN_ARRAY]; |
| 22 | 21 | } |
| 23 | 22 | ); |
@@ -16,12 +16,11 @@ |
||
| 16 | 16 | public function __construct(?callable $errorFormatter = null) |
| 17 | 17 | { |
| 18 | 18 | $this->isAsAsserted = IsAsAsserted::withAssertionAndErrorFormatter( |
| 19 | - function ($data) { |
|
| 19 | + function($data) { |
|
| 20 | 20 | return null !== $data; |
| 21 | 21 | }, |
| 22 | 22 | is_callable($errorFormatter) ? |
| 23 | - $errorFormatter : |
|
| 24 | - function ($data) { |
|
| 23 | + $errorFormatter : function($data) { |
|
| 25 | 24 | return [self::NOT_NOT_NULL]; |
| 26 | 25 | } |
| 27 | 26 | ); |