@@ -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); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | /** |
25 | 25 | * @return callable|null |
26 | 26 | */ |
27 | - public function getStartCallable(): ?callable; |
|
27 | + public function getStartCallable(): ? callable; |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * @return callable |
@@ -34,5 +34,5 @@ discard block |
||
34 | 34 | /** |
35 | 35 | * @return callable|null |
36 | 36 | */ |
37 | - public function getEndCallable(): ?callable; |
|
37 | + public function getEndCallable(): ? callable; |
|
38 | 38 | } |
@@ -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 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php namespace Sample; |
2 | 2 | |
3 | -require_once __DIR__ . '/vendor/autoload.php'; |
|
3 | +require_once __DIR__.'/vendor/autoload.php'; |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Copyright 2015-2017 [email protected] |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | * @param int $code |
50 | 50 | * @param array|null $context |
51 | 51 | */ |
52 | - public function __construct(?string $name, $value, int $code, ?array $context) |
|
52 | + public function __construct(?string $name, $value, int $code, ? array $context) |
|
53 | 53 | { |
54 | 54 | $this->name = $name; |
55 | 55 | $this->value = $value; |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | /** |
85 | 85 | * @inheritdoc |
86 | 86 | */ |
87 | - public function getMessageContext(): ?array |
|
87 | + public function getMessageContext(): ? array |
|
88 | 88 | { |
89 | 89 | return $this->context; |
90 | 90 | } |
@@ -76,8 +76,7 @@ |
||
76 | 76 | $isOk = in_array($value, $values); |
77 | 77 | |
78 | 78 | return $isOk === true ? |
79 | - BlockReplies::createSuccessReply($value) : |
|
80 | - BlockReplies::createErrorReply($context, $value, ErrorCodes::INVALID_VALUE); |
|
79 | + BlockReplies::createSuccessReply($value) : BlockReplies::createErrorReply($context, $value, ErrorCodes::INVALID_VALUE); |
|
81 | 80 | } |
82 | 81 | |
83 | 82 | /** |
@@ -39,5 +39,5 @@ |
||
39 | 39 | /** |
40 | 40 | * @return array|null |
41 | 41 | */ |
42 | - public function getMessageContext(): ?array; |
|
42 | + public function getMessageContext(): ? array; |
|
43 | 43 | } |