@@ -69,11 +69,11 @@ |
||
69 | 69 | */ |
70 | 70 | public function datetime($value): bool |
71 | 71 | { |
72 | - if (!is_scalar($value)) { |
|
72 | + if (!is_scalar($value)){ |
|
73 | 73 | return false; |
74 | 74 | } |
75 | 75 | |
76 | - if (is_numeric($value)) { |
|
76 | + if (is_numeric($value)){ |
|
77 | 77 | return true; |
78 | 78 | } |
79 | 79 |
@@ -69,11 +69,13 @@ |
||
69 | 69 | */ |
70 | 70 | public function datetime($value): bool |
71 | 71 | { |
72 | - if (!is_scalar($value)) { |
|
72 | + if (!is_scalar($value)) |
|
73 | + { |
|
73 | 74 | return false; |
74 | 75 | } |
75 | 76 | |
76 | - if (is_numeric($value)) { |
|
77 | + if (is_numeric($value)) |
|
78 | + { |
|
77 | 79 | return true; |
78 | 80 | } |
79 | 81 |
@@ -94,7 +94,7 @@ |
||
94 | 94 | { |
95 | 95 | $checker = new TypeChecker(); |
96 | 96 | |
97 | - foreach (\DateTimeZone::listIdentifiers() as $identifier) { |
|
97 | + foreach (\DateTimeZone::listIdentifiers() as $identifier){ |
|
98 | 98 | $this->assertTrue($checker->timezone($identifier)); |
99 | 99 | $this->assertFalse($checker->timezone(str_rot13($identifier))); |
100 | 100 | } |
@@ -94,7 +94,8 @@ |
||
94 | 94 | { |
95 | 95 | $checker = new TypeChecker(); |
96 | 96 | |
97 | - foreach (\DateTimeZone::listIdentifiers() as $identifier) { |
|
97 | + foreach (\DateTimeZone::listIdentifiers() as $identifier) |
|
98 | + { |
|
98 | 99 | $this->assertTrue($checker->timezone($identifier)); |
99 | 100 | $this->assertFalse($checker->timezone(str_rot13($identifier))); |
100 | 101 | } |
@@ -19,12 +19,12 @@ |
||
19 | 19 | |
20 | 20 | public function of($value, $checker): bool |
21 | 21 | { |
22 | - if (!is_array($value) || empty($value)) { |
|
22 | + if (!is_array($value) || empty($value)){ |
|
23 | 23 | return false; |
24 | 24 | } |
25 | 25 | |
26 | - foreach ($value as $item) { |
|
27 | - if (!$this->validation->validate(compact('item'), ['item' => [$checker]])->isValid()) { |
|
26 | + foreach ($value as $item){ |
|
27 | + if (!$this->validation->validate(compact('item'), ['item' => [$checker]])->isValid()){ |
|
28 | 28 | return false; |
29 | 29 | } |
30 | 30 | } |
@@ -19,12 +19,15 @@ |
||
19 | 19 | |
20 | 20 | public function of($value, $checker): bool |
21 | 21 | { |
22 | - if (!is_array($value) || empty($value)) { |
|
22 | + if (!is_array($value) || empty($value)) |
|
23 | + { |
|
23 | 24 | return false; |
24 | 25 | } |
25 | 26 | |
26 | - foreach ($value as $item) { |
|
27 | - if (!$this->validation->validate(compact('item'), ['item' => [$checker]])->isValid()) { |
|
27 | + foreach ($value as $item) |
|
28 | + { |
|
29 | + if (!$this->validation->validate(compact('item'), ['item' => [$checker]])->isValid()) |
|
30 | + { |
|
28 | 31 | return false; |
29 | 32 | } |
30 | 33 | } |