@@ -36,7 +36,6 @@ |
||
| 36 | 36 | public static function execute($value, ContextInterface $context): array |
| 37 | 37 | { |
| 38 | 38 | return is_string($value) === true ? |
| 39 | - static::createSuccessReply($value) : |
|
| 40 | - static::createErrorReply($context, $value, ErrorCodes::IS_STRING); |
|
| 39 | + static::createSuccessReply($value) : static::createErrorReply($context, $value, ErrorCodes::IS_STRING); |
|
| 41 | 40 | } |
| 42 | 41 | } |
@@ -37,7 +37,6 @@ |
||
| 37 | 37 | public static function execute($value, ContextInterface $context): array |
| 38 | 38 | { |
| 39 | 39 | return $value instanceof DateTimeInterface ? |
| 40 | - static::createSuccessReply($value) : |
|
| 41 | - static::createErrorReply($context, $value, ErrorCodes::IS_DATE_TIME); |
|
| 40 | + static::createSuccessReply($value) : static::createErrorReply($context, $value, ErrorCodes::IS_DATE_TIME); |
|
| 42 | 41 | } |
| 43 | 42 | } |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | if (is_array($value) === true) { |
| 43 | 43 | foreach ($value as $key => $mightBeString) { |
| 44 | 44 | if (is_string($mightBeString) === true || is_numeric($mightBeString) === true) { |
| 45 | - $result[$key] = (int)$mightBeString; |
|
| 45 | + $result[$key] = (int) $mightBeString; |
|
| 46 | 46 | } else { |
| 47 | 47 | $reply = static::createErrorReply($context, $mightBeString, ErrorCodes::IS_STRING); |
| 48 | 48 | break; |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | public static function execute($value, ContextInterface $context): array |
| 37 | 37 | { |
| 38 | 38 | if (is_string($value) === true || is_numeric($value) === true) { |
| 39 | - return static::createSuccessReply((float)$value); |
|
| 39 | + return static::createSuccessReply((float) $value); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | return static::createErrorReply($context, $value, ErrorCodes::IS_FLOAT); |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | public static function execute($value, ContextInterface $context): array |
| 37 | 37 | { |
| 38 | 38 | if (is_string($value) === true || is_numeric($value) === true) { |
| 39 | - return static::createSuccessReply((int)$value); |
|
| 39 | + return static::createSuccessReply((int) $value); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | return static::createErrorReply($context, $value, ErrorCodes::IS_INT); |
@@ -56,7 +56,6 @@ |
||
| 56 | 56 | $isOk = in_array($value, $values); |
| 57 | 57 | |
| 58 | 58 | return $isOk === true ? |
| 59 | - static::createSuccessReply($value) : |
|
| 60 | - static::createErrorReply($context, $value, ErrorCodes::INVALID_VALUE); |
|
| 59 | + static::createSuccessReply($value) : static::createErrorReply($context, $value, ErrorCodes::INVALID_VALUE); |
|
| 61 | 60 | } |
| 62 | 61 | } |
@@ -73,7 +73,6 @@ |
||
| 73 | 73 | $output = filter_var($value, $filterId, $filterOptions); |
| 74 | 74 | |
| 75 | 75 | return $output !== false ? |
| 76 | - static::createSuccessReply($output) : |
|
| 77 | - static::createErrorReply($context, $value, $errorCode, [$filterId, $filterOptions]); |
|
| 76 | + static::createSuccessReply($output) : static::createErrorReply($context, $value, $errorCode, [$filterId, $filterOptions]); |
|
| 78 | 77 | } |
| 79 | 78 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | */ |
| 40 | 40 | public static function amount(int $max): RuleInterface |
| 41 | 41 | { |
| 42 | - assert ($max > 0); |
|
| 42 | + assert($max > 0); |
|
| 43 | 43 | |
| 44 | 44 | return static::stringToInt(static::between(1, $max)); |
| 45 | 45 | } |
@@ -40,7 +40,6 @@ |
||
| 40 | 40 | $value <= new DateTime('+5 days'); |
| 41 | 41 | |
| 42 | 42 | return $isValidDeliveryDate === true ? |
| 43 | - static::createSuccessReply($value) : |
|
| 44 | - static::createErrorReply($context, $value, Errors::IS_DELIVERY_DATE); |
|
| 43 | + static::createSuccessReply($value) : static::createErrorReply($context, $value, Errors::IS_DELIVERY_DATE); |
|
| 45 | 44 | } |
| 46 | 45 | } |