@@ -59,7 +59,7 @@ |
||
| 59 | 59 | /** |
| 60 | 60 | * Resolve all references |
| 61 | 61 | * |
| 62 | - * @return mixed The whole definition can be a reference to a scalar value |
|
| 62 | + * @return \stdClass The whole definition can be a reference to a scalar value |
|
| 63 | 63 | */ |
| 64 | 64 | public function resolve() |
| 65 | 65 | { |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | /* |
| 3 | 3 | * This file is part of the KleijnWeb\PhpApi\Descriptions package. |
| 4 | 4 | * |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | /* |
| 3 | 3 | * This file is part of the KleijnWeb\PhpApi\Descriptions package. |
| 4 | 4 | * |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | /* |
| 3 | 3 | * This file is part of the KleijnWeb\PhpApi\Descriptions package. |
| 4 | 4 | * |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | */ |
| 51 | 51 | public function apply(callable $f) |
| 52 | 52 | { |
| 53 | - $recurse = function (&$item, $parent = null, $parentAttribute = null) use ($f, &$recurse) { |
|
| 53 | + $recurse = function(&$item, $parent = null, $parentAttribute = null) use ($f, &$recurse) { |
|
| 54 | 54 | |
| 55 | 55 | foreach ($item as $attribute => &$value) { |
| 56 | 56 | if (false === $f($value, $attribute, $parent, $parentAttribute)) { |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | /* |
| 3 | 3 | * This file is part of the KleijnWeb\PhpApi\Descriptions package. |
| 4 | 4 | * |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | /** @var ObjectSchema[] $typeDefinitions */ |
| 48 | 48 | $typeDefinitions = []; |
| 49 | 49 | |
| 50 | - $description->accept(new ClosureVisitor($this, function ($schema) use (&$typeDefinitions) { |
|
| 50 | + $description->accept(new ClosureVisitor($this, function($schema) use (&$typeDefinitions) { |
|
| 51 | 51 | if ($schema instanceof ObjectSchema) { |
| 52 | 52 | if ($schema->isType(Schema::TYPE_OBJECT) && isset($schema->getDefinition()->{'x-ref-id'})) { |
| 53 | 53 | $typeName = substr( |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | $complexTypes[] = $type; |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | - $description->accept(new ClosureVisitor($description, function () use (&$complexTypes) { |
|
| 69 | + $description->accept(new ClosureVisitor($description, function() use (&$complexTypes) { |
|
| 70 | 70 | /** @noinspection PhpUndefinedFieldInspection */ |
| 71 | 71 | $this->complexTypes = $complexTypes; |
| 72 | 72 | })); |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | /* |
| 3 | 3 | * This file is part of the KleijnWeb\PhpApi\Descriptions package. |
| 4 | 4 | * |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | $paths = []; |
| 31 | 31 | |
| 32 | 32 | /** @noinspection PhpUnusedParameterInspection */ |
| 33 | - $this->document->apply(function ($definition, $attributeName, $parent, $parentAttributeName) use (&$paths) { |
|
| 33 | + $this->document->apply(function($definition, $attributeName, $parent, $parentAttributeName) use (&$paths) { |
|
| 34 | 34 | if (substr((string)$attributeName, 0, 1) === '/') { |
| 35 | 35 | $pathName = "{$parentAttributeName}{$attributeName}"; |
| 36 | 36 | $paths[$pathName] = $this->createPath($pathName, $definition); |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | /* |
| 3 | 3 | * This file is part of the KleijnWeb\PhpApi\Descriptions package. |
| 4 | 4 | * |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | $definition = $schema->getDefinition(); |
| 35 | 35 | |
| 36 | 36 | if ($requireAllWhenNotSpecified || $forceNoAdditionalProperties) { |
| 37 | - $hackDefinition = function (\stdClass $definition) use ( |
|
| 37 | + $hackDefinition = function(\stdClass $definition) use ( |
|
| 38 | 38 | $forceNoAdditionalProperties, |
| 39 | 39 | $requireAllWhenNotSpecified, |
| 40 | 40 | &$hackDefinition |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | /* |
| 3 | 3 | * This file is part of the KleijnWeb\PhpApi\Descriptions package. |
| 4 | 4 | * |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $body = null |
| 50 | 50 | ): \stdClass { |
| 51 | 51 | |
| 52 | - $headerParamMap = array_combine(array_map(function ($key) { |
|
| 52 | + $headerParamMap = array_combine(array_map(function($key) { |
|
| 53 | 53 | return $this->getHeaderParameterName($key); |
| 54 | 54 | }, array_keys($headers)), array_keys($headers)); |
| 55 | 55 | |
@@ -129,18 +129,18 @@ discard block |
||
| 129 | 129 | private function getHeaderParameterName(string $headerName) |
| 130 | 130 | { |
| 131 | 131 | $replacements = [ |
| 132 | - function ($matches) { |
|
| 132 | + function($matches) { |
|
| 133 | 133 | return strtolower($matches[2]); |
| 134 | 134 | }, |
| 135 | - function ($matches) { |
|
| 135 | + function($matches) { |
|
| 136 | 136 | return strtoupper($matches[2]); |
| 137 | 137 | }, |
| 138 | - function ($matches) { |
|
| 138 | + function($matches) { |
|
| 139 | 139 | return strtoupper($matches[1]); |
| 140 | 140 | }, |
| 141 | 141 | ]; |
| 142 | 142 | |
| 143 | - foreach (['/^(X-)?(.*)/i', '/(\-)([\S]{1})/', '/(^[\S]{1})/',] as $index => $pattern) { |
|
| 143 | + foreach (['/^(X-)?(.*)/i', '/(\-)([\S]{1})/', '/(^[\S]{1})/', ] as $index => $pattern) { |
|
| 144 | 144 | $headerName = preg_replace_callback($pattern, $replacements[$index], $headerName); |
| 145 | 145 | } |
| 146 | 146 | |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | /* |
| 3 | 3 | * This file is part of the KleijnWeb\PhpApi\Descriptions package. |
| 4 | 4 | * |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | /* |
| 3 | 3 | * This file is part of the KleijnWeb\PhpApi\Descriptions package. |
| 4 | 4 | * |