Skip to content

Commit d978f28

Browse files
committed
style: Correct code style violations
1 parent 0bf41d5 commit d978f28

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/JsonSchema/Constraints/Drafts/Draft07/ContentConstraint.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use JsonSchema\Constraints\Factory;
1010
use JsonSchema\Entity\ErrorBagProxy;
1111
use JsonSchema\Entity\JsonPointer;
12-
use JsonSchema\Tool\DeepComparer;
1312

1413
class ContentConstraint implements ConstraintInterface
1514
{
@@ -25,7 +24,7 @@ public function check(&$value, $schema = null, ?JsonPointer $path = null, $i = n
2524
if (!property_exists($schema, 'contentMediaType') && !property_exists($schema, 'contentEncoding')) {
2625
return;
2726
}
28-
if (! is_string($value)) {
27+
if (!is_string($value)) {
2928
return;
3029
}
3130

@@ -35,6 +34,7 @@ public function check(&$value, $schema = null, ?JsonPointer $path = null, $i = n
3534
if ($schema->contentEncoding === 'base64') {
3635
if (!preg_match('/^[A-Za-z0-9+\/=]+$/', $decodedValue)) {
3736
$this->addError(ConstraintError::CONTENT_ENCODING(), $path, ['contentEncoding' => $schema->contentEncoding]);
37+
3838
return;
3939
}
4040
$decodedValue = base64_decode($decodedValue);
@@ -50,8 +50,6 @@ public function check(&$value, $schema = null, ?JsonPointer $path = null, $i = n
5050
}
5151

5252
$this->addError(ConstraintError::CONTENT_MEDIA_TYPE(), $path, ['contentMediaType' => $schema->contentMediaType]);
53-
5453
}
55-
5654
}
5755
}

src/JsonSchema/Constraints/Drafts/Draft07/FormatConstraint.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace JsonSchema\Constraints\Drafts\Draft07;
66

77
use DateTimeZone;
8-
use IntlChar;
98
use JsonSchema\ConstraintError;
109
use JsonSchema\Constraints\ConstraintInterface;
1110
use JsonSchema\Constraints\Factory;
@@ -172,8 +171,6 @@ private function validateDateTime(string $datetime, string $format): bool
172171
$expected = sprintf('%s60%s', substr($expected, 0, 6), substr($expected, 8));
173172
}
174173

175-
176-
177174
return $datetime === $expected;
178175
}
179176

0 commit comments

Comments
 (0)