@@ -45,8 +45,7 @@ |
||
45 | 45 | $isValidDeliveryDate = $value instanceof DateTimeInterface === true && $value >= $from && $value <= $to; |
46 | 46 | |
47 | 47 | return $isValidDeliveryDate === true ? |
48 | - static::createSuccessReply($value) : |
|
49 | - static::createErrorReply( |
|
48 | + static::createSuccessReply($value) : static::createErrorReply( |
|
50 | 49 | $context, |
51 | 50 | $value, |
52 | 51 | Errors::IS_DELIVERY_DATE, |
@@ -41,8 +41,7 @@ |
||
41 | 41 | $idExists = is_int($value) === true && $value < 3; |
42 | 42 | |
43 | 43 | return $idExists === true ? |
44 | - static::createSuccessReply($value) : |
|
45 | - static::createErrorReply( |
|
44 | + static::createSuccessReply($value) : static::createErrorReply( |
|
46 | 45 | $context, |
47 | 46 | $value, |
48 | 47 | Errors::IS_VALID_SKU, |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace Sample; |
4 | 4 | |
5 | -require_once __DIR__ . '/vendor/autoload.php'; |
|
5 | +require_once __DIR__.'/vendor/autoload.php'; |
|
6 | 6 | |
7 | 7 | /** |
8 | 8 | * Copyright 2015-2020 [email protected] |
@@ -48,7 +48,7 @@ |
||
48 | 48 | if (is_iterable($value) === true) { |
49 | 49 | foreach ($value as $key => $mightBeString) { |
50 | 50 | if (is_string($mightBeString) === true || is_numeric($mightBeString) === true) { |
51 | - $result[$key] = (int)$mightBeString; |
|
51 | + $result[$key] = (int) $mightBeString; |
|
52 | 52 | } else { |
53 | 53 | $reply = static::createErrorReply( |
54 | 54 | $context, |
@@ -40,7 +40,6 @@ |
||
40 | 40 | public static function execute($value, ContextInterface $context): array |
41 | 41 | { |
42 | 42 | return is_bool($value) === true ? |
43 | - static::createSuccessReply($value) : |
|
44 | - static::createErrorReply($context, $value, ErrorCodes::IS_BOOL, Messages::IS_BOOL, []); |
|
43 | + static::createSuccessReply($value) : static::createErrorReply($context, $value, ErrorCodes::IS_BOOL, Messages::IS_BOOL, []); |
|
45 | 44 | } |
46 | 45 | } |
@@ -40,7 +40,6 @@ |
||
40 | 40 | public static function execute($value, ContextInterface $context): array |
41 | 41 | { |
42 | 42 | return is_float($value) === true ? |
43 | - static::createSuccessReply($value) : |
|
44 | - static::createErrorReply($context, $value, ErrorCodes::IS_FLOAT, Messages::IS_FLOAT, []); |
|
43 | + static::createSuccessReply($value) : static::createErrorReply($context, $value, ErrorCodes::IS_FLOAT, Messages::IS_FLOAT, []); |
|
45 | 44 | } |
46 | 45 | } |
@@ -40,7 +40,6 @@ |
||
40 | 40 | public static function execute($value, ContextInterface $context): array |
41 | 41 | { |
42 | 42 | return is_array($value) === true ? |
43 | - static::createSuccessReply($value) : |
|
44 | - static::createErrorReply($context, $value, ErrorCodes::IS_ARRAY, Messages::IS_ARRAY, []); |
|
43 | + static::createSuccessReply($value) : static::createErrorReply($context, $value, ErrorCodes::IS_ARRAY, Messages::IS_ARRAY, []); |
|
45 | 44 | } |
46 | 45 | } |
@@ -40,7 +40,6 @@ |
||
40 | 40 | public static function execute($value, ContextInterface $context): array |
41 | 41 | { |
42 | 42 | return $value instanceof DateTimeInterface ? |
43 | - static::createSuccessReply($value) : |
|
44 | - static::createErrorReply($context, $value, ErrorCodes::IS_DATE_TIME, Messages::IS_DATE_TIME, []); |
|
43 | + static::createSuccessReply($value) : static::createErrorReply($context, $value, ErrorCodes::IS_DATE_TIME, Messages::IS_DATE_TIME, []); |
|
45 | 44 | } |
46 | 45 | } |
@@ -40,7 +40,6 @@ |
||
40 | 40 | public static function execute($value, ContextInterface $context): array |
41 | 41 | { |
42 | 42 | return is_int($value) === true ? |
43 | - static::createSuccessReply($value) : |
|
44 | - static::createErrorReply($context, $value, ErrorCodes::IS_INT, Messages::IS_INT, []); |
|
43 | + static::createSuccessReply($value) : static::createErrorReply($context, $value, ErrorCodes::IS_INT, Messages::IS_INT, []); |
|
45 | 44 | } |
46 | 45 | } |