@@ -47,7 +47,6 @@ |
||
| 47 | 47 | public static function execute($value, ContextInterface $context): array |
| 48 | 48 | { |
| 49 | 49 | return is_numeric($value) === true ? |
| 50 | - BlockReplies::createSuccessReply($value) : |
|
| 51 | - BlockReplies::createErrorReply($context, $value, ErrorCodes::IS_NUMERIC); |
|
| 50 | + BlockReplies::createSuccessReply($value) : BlockReplies::createErrorReply($context, $value, ErrorCodes::IS_NUMERIC); |
|
| 52 | 51 | } |
| 53 | 52 | } |
@@ -48,7 +48,6 @@ |
||
| 48 | 48 | public static function execute($value, ContextInterface $context): array |
| 49 | 49 | { |
| 50 | 50 | return $value instanceof DateTimeInterface ? |
| 51 | - BlockReplies::createSuccessReply($value) : |
|
| 52 | - BlockReplies::createErrorReply($context, $value, ErrorCodes::IS_DATE_TIME); |
|
| 51 | + BlockReplies::createSuccessReply($value) : BlockReplies::createErrorReply($context, $value, ErrorCodes::IS_DATE_TIME); |
|
| 53 | 52 | } |
| 54 | 53 | } |
@@ -128,7 +128,7 @@ |
||
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | /** |
| 131 | - * @param callable|null $endCallable |
|
| 131 | + * @param callable $endCallable |
|
| 132 | 132 | * |
| 133 | 133 | * @return self |
| 134 | 134 | */ |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | /** |
| 73 | 73 | * @inheritdoc |
| 74 | 74 | */ |
| 75 | - public function getStartCallable(): ?callable |
|
| 75 | + public function getStartCallable(): ? callable |
|
| 76 | 76 | { |
| 77 | 77 | return $this->startCallable; |
| 78 | 78 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | /** |
| 89 | 89 | * @inheritdoc |
| 90 | 90 | */ |
| 91 | - public function getEndCallable(): ?callable |
|
| 91 | + public function getEndCallable(): ? callable |
|
| 92 | 92 | { |
| 93 | 93 | return $this->endCallable; |
| 94 | 94 | } |
@@ -23,15 +23,15 @@ |
||
| 23 | 23 | { |
| 24 | 24 | /** |
| 25 | 25 | * @param int $key |
| 26 | - * @param mixed $default |
|
| 26 | + * @param boolean $default |
|
| 27 | 27 | * |
| 28 | - * @return mixed |
|
| 28 | + * @return ContextInterface |
|
| 29 | 29 | */ |
| 30 | 30 | public function getState(int $key, $default = null); |
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * @param int $key |
| 34 | - * @param mixed $value |
|
| 34 | + * @param boolean $value |
|
| 35 | 35 | * |
| 36 | 36 | * @return self |
| 37 | 37 | */ |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | public static function execute($value, ContextInterface $context): array |
| 48 | 48 | { |
| 49 | 49 | if (is_string($value) === true || is_numeric($value) === true) { |
| 50 | - return BlockReplies::createSuccessReply((int)$value); |
|
| 50 | + return BlockReplies::createSuccessReply((int) $value); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | return BlockReplies::createErrorReply($context, $value, ErrorCodes::IS_INT); |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | if (is_array($value) === true) { |
| 54 | 54 | foreach ($value as $key => $mightBeString) { |
| 55 | 55 | if (is_string($mightBeString) === true || is_numeric($mightBeString) === true) { |
| 56 | - $result[$key] = (int)$mightBeString; |
|
| 56 | + $result[$key] = (int) $mightBeString; |
|
| 57 | 57 | } else { |
| 58 | 58 | $reply = BlockReplies::createErrorReply($context, $mightBeString, ErrorCodes::IS_STRING); |
| 59 | 59 | break; |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | public static function execute($value, ContextInterface $context): array |
| 48 | 48 | { |
| 49 | 49 | if (is_string($value) === true || is_numeric($value) === true) { |
| 50 | - return BlockReplies::createSuccessReply((float)$value); |
|
| 50 | + return BlockReplies::createSuccessReply((float) $value); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | return BlockReplies::createErrorReply($context, $value, ErrorCodes::IS_FLOAT); |
@@ -128,7 +128,7 @@ |
||
| 128 | 128 | /** |
| 129 | 129 | * @inheritdoc |
| 130 | 130 | */ |
| 131 | - public function getParent(): ?RuleInterface |
|
| 131 | + public function getParent(): ? RuleInterface |
|
| 132 | 132 | { |
| 133 | 133 | return $this->parent; |
| 134 | 134 | } |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | /** |
| 59 | 59 | * @return RuleInterface|null |
| 60 | 60 | */ |
| 61 | - public function getParent(): ?RuleInterface; |
|
| 61 | + public function getParent(): ? RuleInterface; |
|
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | 64 | * @param RuleInterface $rule |