| @@ -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 |      { | 
| @@ -49,7 +49,7 @@ | ||
| 49 | 49 | */ | 
| 50 | 50 | public function apply(callable $f) | 
| 51 | 51 |      { | 
| 52 | -        $recurse = function (&$item, $parent = null, $parentAttribute = null) use ($f, &$recurse) { | |
| 52 | +        $recurse = function(&$item, $parent = null, $parentAttribute = null) use ($f, &$recurse) { | |
| 53 | 53 | |
| 54 | 54 |              foreach ($item as $attribute => &$value) { | 
| 55 | 55 |                  if (false === $f($value, $attribute, $parent, $parentAttribute)) { | 
| @@ -28,7 +28,7 @@ | ||
| 28 | 28 |          $schemes = array_map('strtolower', isset($this->document->protocols) ? $this->document->protocols : []); | 
| 29 | 29 | $paths = []; | 
| 30 | 30 | |
| 31 | -        $this->document->apply(function ($definition, $attributeName, $parent, $parentAttributeName) use (&$paths) { | |
| 31 | +        $this->document->apply(function($definition, $attributeName, $parent, $parentAttributeName) use (&$paths) { | |
| 32 | 32 |              if (substr((string)$attributeName, 0, 1) === '/') { | 
| 33 | 33 |                  $pathName         = "{$parentAttributeName}{$attributeName}"; | 
| 34 | 34 | $paths[$pathName] = $this->createPath($pathName, $definition); | 
| @@ -42,7 +42,7 @@ discard block | ||
| 42 | 42 | /** @var ObjectSchema[] $typeDefinitions */ | 
| 43 | 43 | $typeDefinitions = []; | 
| 44 | 44 | |
| 45 | -        $description->accept(new ClosureVisitor($this, function ($schema) use (&$typeDefinitions) { | |
| 45 | +        $description->accept(new ClosureVisitor($this, function($schema) use (&$typeDefinitions) { | |
| 46 | 46 |              if ($schema instanceof ObjectSchema) { | 
| 47 | 47 |                  if ($schema->isType(Schema::TYPE_OBJECT) && isset($schema->getDefinition()->{'x-ref-id'})) { | 
| 48 | 48 | $typeName = substr( | 
| @@ -61,7 +61,7 @@ discard block | ||
| 61 | 61 | $complexTypes[] = $type; | 
| 62 | 62 | } | 
| 63 | 63 | |
| 64 | -        $description->accept(new ClosureVisitor($description, function () use (&$complexTypes) { | |
| 64 | +        $description->accept(new ClosureVisitor($description, function() use (&$complexTypes) { | |
| 65 | 65 | $this->complexTypes = $complexTypes; | 
| 66 | 66 | })); | 
| 67 | 67 | |
| @@ -171,8 +171,6 @@ | ||
| 171 | 171 | } | 
| 172 | 172 | |
| 173 | 173 | /** | 
| 174 | - * @param string $path | |
| 175 | - * @param string $method | |
| 176 | 174 | * | 
| 177 | 175 | * @return Parameter|null | 
| 178 | 176 | */ | 
| @@ -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 | |
| @@ -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 | 
| @@ -120,7 +120,7 @@ | ||
| 120 | 120 |      { | 
| 121 | 121 |          if (!$this->hasPath($path)) { | 
| 122 | 122 | throw new \InvalidArgumentException( | 
| 123 | -                "Path '$path' does not exist (have ".implode(', ', array_keys($this->paths)).')' | |
| 123 | +                "Path '$path' does not exist (have " . implode(', ', array_keys($this->paths)) . ')' | |
| 124 | 124 | ); | 
| 125 | 125 | } | 
| 126 | 126 | |