Skip to content

Commit 2cb0bef

Browse files
committed
Fix: Run php-cs-fixer
1 parent 4740600 commit 2cb0bef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+506
-506
lines changed

src/JsonSchema/ConstraintError.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function getMessage()
100100
self::PROPERTIES_MIN => 'Must contain a minimum of %d properties',
101101
self::PROPERTIES_MAX => 'Must contain no more than %d properties',
102102
self::TYPE => '%s value found, but %s is required',
103-
self::UNIQUE_ITEMS => 'There are no duplicates allowed in the array'
103+
self::UNIQUE_ITEMS => 'There are no duplicates allowed in the array',
104104
);
105105

106106
if (!isset($messages[$name])) {

src/JsonSchema/Constraints/BaseConstraint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function addError(ConstraintError $constraint, JsonPointer $path = null,
6060
}, array_values($more)))),
6161
'constraint' => array(
6262
'name' => $name,
63-
'params' => $more
63+
'params' => $more,
6464
),
6565
'context' => $this->factory->getErrorContext(),
6666
);

src/JsonSchema/Constraints/CollectionConstraint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ protected function validateItems(&$value, $schema = null, JsonPointer $path = nu
104104
array(
105105
'item' => $i,
106106
'property' => $k,
107-
'additionalItems' => $schema->additionalItems
107+
'additionalItems' => $schema->additionalItems,
108108
)
109109
);
110110
}

src/JsonSchema/Constraints/Factory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class Factory
6161
'const' => 'JsonSchema\Constraints\ConstConstraint',
6262
'format' => 'JsonSchema\Constraints\FormatConstraint',
6363
'schema' => 'JsonSchema\Constraints\SchemaConstraint',
64-
'validator' => 'JsonSchema\Validator'
64+
'validator' => 'JsonSchema\Validator',
6565
);
6666

6767
/**

src/JsonSchema/Constraints/FormatConstraint.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function check(&$element, $schema = null, JsonPointer $path = null, $i =
3636
if (!$date = $this->validateDateTime($element, 'Y-m-d')) {
3737
$this->addError(ConstraintError::FORMAT_DATE(), $path, array(
3838
'date' => $element,
39-
'format' => $schema->format
39+
'format' => $schema->format,
4040
)
4141
);
4242
}
@@ -56,7 +56,7 @@ public function check(&$element, $schema = null, JsonPointer $path = null, $i =
5656
if (null === Rfc3339::createFromString($element)) {
5757
$this->addError(ConstraintError::FORMAT_DATE_TIME(), $path, array(
5858
'dateTime' => json_encode($element),
59-
'format' => $schema->format
59+
'format' => $schema->format,
6060
)
6161
);
6262
}
@@ -66,15 +66,15 @@ public function check(&$element, $schema = null, JsonPointer $path = null, $i =
6666
if (!$this->validateDateTime($element, 'U')) {
6767
$this->addError(ConstraintError::FORMAT_DATE_UTC(), $path, array(
6868
'value' => $element,
69-
'format' => $schema->format));
69+
'format' => $schema->format, ));
7070
}
7171
break;
7272

7373
case 'regex':
7474
if (!$this->validateRegex($element)) {
7575
$this->addError(ConstraintError::FORMAT_REGEX(), $path, array(
7676
'value' => $element,
77-
'format' => $schema->format
77+
'format' => $schema->format,
7878
)
7979
);
8080
}
@@ -204,7 +204,7 @@ protected function validateColor($color)
204204
{
205205
if (in_array(strtolower($color), array('aqua', 'black', 'blue', 'fuchsia',
206206
'gray', 'green', 'lime', 'maroon', 'navy', 'olive', 'orange', 'purple',
207-
'red', 'silver', 'teal', 'white', 'yellow'))) {
207+
'red', 'silver', 'teal', 'white', 'yellow', ))) {
208208
return true;
209209
}
210210

src/JsonSchema/Constraints/ObjectConstraint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function validateElement($element, $matches, $schema = null, JsonPointer
118118
if ($require && !$this->getProperty($element, $require)) {
119119
$this->addError(ConstraintError::REQUIRES(), $path, array(
120120
'property' => $i,
121-
'requiredProperty' => $require
121+
'requiredProperty' => $require,
122122
));
123123
}
124124

src/JsonSchema/Constraints/TypeConstraint.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function check(&$value = null, $schema = null, JsonPointer $path = null,
7171
}
7272
$this->addError(ConstraintError::TYPE(), $path, array(
7373
'found' => gettype($value),
74-
'expected' => $this->implodeWith($wording, ', ', 'or')
74+
'expected' => $this->implodeWith($wording, ', ', 'or'),
7575
));
7676
}
7777
}
@@ -134,10 +134,10 @@ protected function implodeWith(array $elements, $delimiter = ', ', $listEnd = fa
134134
return implode($delimiter, $elements);
135135
}
136136
$lastElement = array_slice($elements, -1);
137-
$firsElements = join($delimiter, array_slice($elements, 0, -1));
137+
$firsElements = implode($delimiter, array_slice($elements, 0, -1));
138138
$implodedElements = array_merge(array($firsElements), $lastElement);
139139

140-
return join(" $listEnd ", $implodedElements);
140+
return implode(" $listEnd ", $implodedElements);
141141
}
142142

143143
/**

src/JsonSchema/Constraints/UndefinedConstraint.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ protected function validateCommonProperties(&$value, $schema = null, JsonPointer
141141
$this->addError(
142142
ConstraintError::REQUIRED(),
143143
$this->incrementPath($path ?: new JsonPointer(''), $required), array(
144-
'property' => $required
144+
'property' => $required,
145145
)
146146
);
147147
}
@@ -385,7 +385,7 @@ protected function validateDependencies($value, $dependencies, JsonPointer $path
385385
if (!$this->getTypeCheck()->propertyExists($value, $dependency)) {
386386
$this->addError(ConstraintError::DEPENDENCIES(), $path, array(
387387
'key' => $key,
388-
'dependency' => $dependency
388+
'dependency' => $dependency,
389389
));
390390
}
391391
} elseif (is_array($dependency)) {
@@ -394,7 +394,7 @@ protected function validateDependencies($value, $dependencies, JsonPointer $path
394394
if (!$this->getTypeCheck()->propertyExists($value, $d)) {
395395
$this->addError(ConstraintError::DEPENDENCIES(), $path, array(
396396
'key' => $key,
397-
'dependency' => $dependency
397+
'dependency' => $dependency,
398398
));
399399
}
400400
}

src/JsonSchema/Uri/UriResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function parse($uri)
3535
$components = array(
3636
'scheme' => $match[2],
3737
'authority' => $match[4],
38-
'path' => $match[5]
38+
'path' => $match[5],
3939
);
4040
}
4141
if (7 < count($match)) {

src/JsonSchema/Uri/UriRetriever.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class UriRetriever implements BaseUriRetrieverInterface
2929
*/
3030
protected $translationMap = array(
3131
// use local copies of the spec schemas
32-
'|^https?://json-schema.org/draft-(0[34])/schema#?|' => 'package://dist/schema/json-schema-draft-$1.json'
32+
'|^https?://json-schema.org/draft-(0[34])/schema#?|' => 'package://dist/schema/json-schema-draft-$1.json',
3333
);
3434

3535
/**
@@ -229,7 +229,7 @@ public function parse($uri)
229229
$components = array(
230230
'scheme' => $match[2],
231231
'authority' => $match[4],
232-
'path' => $match[5]
232+
'path' => $match[5],
233233
);
234234
}
235235

0 commit comments

Comments
 (0)