1 | <?php |
||
13 | class HardCodedTargetOrigins implements TargetOriginInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var \string[] |
||
17 | */ |
||
18 | private $origins; |
||
19 | |||
20 | /** |
||
21 | * @param \string[] ...$origins A set of domain names for YOUR application. |
||
22 | */ |
||
23 | public function __construct(string ...$origins) |
||
27 | |||
28 | /** |
||
29 | * Returns an array of domain names for your application. |
||
30 | * If the "source" origin matches one of these origins, the request is valid. |
||
31 | * |
||
32 | * @return string[] |
||
33 | * @throws \TheCodingMachine\Middlewares\CsrfHeaderCheckMiddlewareException |
||
34 | */ |
||
35 | public function __invoke(ServerRequestInterface $request): array |
||
39 | } |
||
40 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..