src/CorsMiddleware.php
changed.
Other files ignored by Codecov
CHANGELOG.md
has changed.
47 | 47 | use Tuupola\Http\Factory\ResponseFactory; |
|
48 | 48 | use Tuupola\Middleware\Settings as CorsSettings; |
|
49 | 49 | ||
50 | - | /** |
|
51 | - | * @template TSanitizedOptions of array{ |
|
52 | - | * origin?: array<string>, |
|
53 | - | * methods?: array<string>|callable|null, |
|
54 | - | * "headers.allow"?: array<string>, |
|
55 | - | * "headers.expose"?: array<string>, |
|
56 | - | * credentials?: bool, |
|
57 | - | * "origin.server"?: null|string|array<string>, |
|
58 | - | * cache?: int, |
|
59 | - | * error?: null|callable, |
|
60 | - | * logger?: null|LoggerInterface, |
|
61 | - | * } |
|
62 | - | */ |
|
63 | 50 | final class CorsMiddleware implements MiddlewareInterface |
|
64 | 51 | { |
|
65 | 52 | use DoublePassTrait; |
118 | 105 | $options["origin"] = (array) $options["origin"]; |
|
119 | 106 | } |
|
120 | 107 | ||
121 | - | /** @var TSanitizedOptions $options */ |
|
122 | 108 | /* Store passed in options overwriting any defaults. */ |
|
123 | 109 | $this->hydrate($options); |
|
124 | 110 | } |
188 | 174 | ||
189 | 175 | /** |
|
190 | 176 | * Hydrate all options from the given array. |
|
191 | - | * |
|
192 | - | * @param TSanitizedOptions $data |
|
193 | 177 | */ |
|
194 | 178 | private function hydrate(array $data = []): void |
|
195 | 179 | { |
Files | Complexity | Coverage |
---|---|---|
src | 49 | 99.24% |
Project Totals (2 files) | 49 | 99.24% |
1 |
comment: false |