Skip to content

Commit fa40bf8

Browse files
committed
fix code style
1 parent 15936b2 commit fa40bf8

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ all:
1111
check-style: php-cs-fixer.phar
1212
PHP_CS_FIXER_IGNORE_ENV=1 ./php-cs-fixer.phar fix src/ --diff --dry-run
1313

14-
fix-style:
14+
fix-style: php-cs-fixer.phar
1515
vendor/bin/indent --tabs composer.json
1616
vendor/bin/indent --spaces .php_cs.dist
17-
vendor/bin/php-cs-fixer fix src/ --diff
17+
./php-cs-fixer.phar fix src/ --diff
1818

1919
install:
2020
composer install --prefer-dist --no-interaction --no-progress --no-suggest --ansi
@@ -43,7 +43,7 @@ schemas/openapi-v3.0.yaml: vendor/oai/openapi-specification/schemas/v3.0/schema.
4343
cp $< $@
4444

4545
php-cs-fixer.phar:
46-
wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.16.7/php-cs-fixer.phar && chmod +x php-cs-fixer.phar
46+
wget -q https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.16.7/php-cs-fixer.phar && chmod +x php-cs-fixer.phar
4747

4848
# find spec classes that are not mentioned in tests with @covers yet
4949
coverage: .php-openapi-covA .php-openapi-covB

src/ReferenceContext.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ private function reduceDots($path)
115115
{
116116
$parts = explode('/', ltrim($path, '/'));
117117
$c = count($parts);
118-
for($i = 0; $i < $c; $i++) {
118+
for ($i = 0; $i < $c; $i++) {
119119
if ($parts[$i] === '.') {
120120
unset($parts[$i]);
121121
continue;
@@ -265,5 +265,4 @@ public function resolveReferenceData($uri, JsonPointer $pointer, $data, $toType)
265265

266266
return $referencedObject;
267267
}
268-
269268
}

src/spec/Reference.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ public function resolve(ReferenceContext $context = null)
187187
}
188188
try {
189189
if ($jsonReference->getDocumentUri() === '') {
190-
191190
if ($context->mode === ReferenceContext::RESOLVE_MODE_INLINE) {
192191
return $this;
193192
}
@@ -298,7 +297,7 @@ private function adjustRelativeReferences($referencedDocument, $basePath, $baseD
298297
$baseDocument = $referencedDocument;
299298
}
300299

301-
foreach($referencedDocument as $key => $value) {
300+
foreach ($referencedDocument as $key => $value) {
302301
if ($key === '$ref' && is_string($value)) {
303302
if (isset($value[0]) && $value[0] === '#') {
304303
// direcly inline references in the same document,

0 commit comments

Comments
 (0)