@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $body = null |
| 49 | 49 | ): \stdClass { |
| 50 | 50 | |
| 51 | - $headerParamMap = array_combine(array_map(function ($key) { |
|
| 51 | + $headerParamMap = array_combine(array_map(function($key) { |
|
| 52 | 52 | return $this->getHeaderParameterName($key); |
| 53 | 53 | }, array_keys($headers)), array_keys($headers)); |
| 54 | 54 | |
@@ -128,18 +128,18 @@ discard block |
||
| 128 | 128 | private function getHeaderParameterName(string $headerName) |
| 129 | 129 | { |
| 130 | 130 | $replacements = [ |
| 131 | - function ($matches) { |
|
| 131 | + function($matches) { |
|
| 132 | 132 | return strtolower($matches[2]); |
| 133 | 133 | }, |
| 134 | - function ($matches) { |
|
| 134 | + function($matches) { |
|
| 135 | 135 | return strtoupper($matches[2]); |
| 136 | 136 | }, |
| 137 | - function ($matches) { |
|
| 137 | + function($matches) { |
|
| 138 | 138 | return strtoupper($matches[1]); |
| 139 | 139 | }, |
| 140 | 140 | ]; |
| 141 | 141 | |
| 142 | - foreach (['/^(X-)?(.*)/i', '/(\-)([\S]{1})/', '/(^[\S]{1})/',] as $index => $pattern) { |
|
| 142 | + foreach (['/^(X-)?(.*)/i', '/(\-)([\S]{1})/', '/(^[\S]{1})/', ] as $index => $pattern) { |
|
| 143 | 143 | $headerName = preg_replace_callback($pattern, $replacements[$index], $headerName); |
| 144 | 144 | } |
| 145 | 145 | |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | $paths = []; |
| 30 | 30 | |
| 31 | 31 | /** @noinspection PhpUnusedParameterInspection */ |
| 32 | - $this->document->apply(function ($definition, $attributeName, $parent, $parentAttributeName) use (&$paths) { |
|
| 32 | + $this->document->apply(function($definition, $attributeName, $parent, $parentAttributeName) use (&$paths) { |
|
| 33 | 33 | if (substr((string)$attributeName, 0, 1) === '/') { |
| 34 | 34 | $pathName = "{$parentAttributeName}{$attributeName}"; |
| 35 | 35 | $paths[$pathName] = $this->createPath($pathName, $definition); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - return array_map(function ($value) { |
|
| 55 | + return array_map(function($value) { |
|
| 56 | 56 | return $this->itemsProcessor->hydrate($value); |
| 57 | 57 | }, $value); |
| 58 | 58 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | public function dehydrate($value) |
| 65 | 65 | { |
| 66 | - return array_map(function ($value) { |
|
| 66 | + return array_map(function($value) { |
|
| 67 | 67 | return $this->itemsProcessor->dehydrate($value); |
| 68 | 68 | }, $value); |
| 69 | 69 | } |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | if (is_array($value)) { |
| 69 | - return array_map(function ($itemValue) { |
|
| 69 | + return array_map(function($itemValue) { |
|
| 70 | 70 | return $this->hydrate($itemValue); |
| 71 | 71 | }, $value); |
| 72 | 72 | } |
@@ -34,7 +34,7 @@ |
||
| 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 |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | public function __construct(\stdClass $definition) |
| 39 | 39 | { |
| 40 | 40 | parent::__construct($definition); |
| 41 | - $this->enum = isset($definition->enum) ? (array)$definition->enum : null; |
|
| 41 | + $this->enum = isset($definition->enum) ? (array)$definition->enum : null; |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | /** |
@@ -50,7 +50,7 @@ |
||
| 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)) { |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | $description = new Description($paths, [], $host, $schemes, $extensions, $this->document); |
| 47 | 47 | |
| 48 | - $this->document->apply(function ($composite, $attribute, $parent, $parentAttribute) use (&$typeSchemas) { |
|
| 48 | + $this->document->apply(function($composite, $attribute, $parent, $parentAttribute) use (&$typeSchemas) { |
|
| 49 | 49 | if ($composite instanceof \stdClass) { |
| 50 | 50 | if ($parentAttribute === 'definitions') { |
| 51 | 51 | $this->schemaFactory->create($composite, $attribute); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | $this->schemaFactory->setClassNameResolver($this->classNameResolver); |
| 58 | 58 | $types = $this->schemaFactory->resolveTypes(); |
| 59 | 59 | |
| 60 | - $description->accept(new ClosureVisitor($description, function () use ($types) { |
|
| 60 | + $description->accept(new ClosureVisitor($description, function() use ($types) { |
|
| 61 | 61 | /** @noinspection PhpUndefinedFieldInspection */ |
| 62 | 62 | $this->complexTypes = $types; |
| 63 | 63 | })); |
@@ -159,7 +159,7 @@ |
||
| 159 | 159 | } |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | - return array_map(function(ObjectSchema $schema){ |
|
| 162 | + return array_map(function(ObjectSchema $schema) { |
|
| 163 | 163 | return $schema->getComplexType(); |
| 164 | 164 | }, $this->typedSchemas); |
| 165 | 165 | } |