1 | <?php declare(strict_types=1); |
||
13 | final class SessionMiddleware |
||
14 | { |
||
15 | const ATTRIBUTE_NAME = 'wyrihaximus.react.http.middleware.session'; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | private $cookieName = ''; |
||
21 | |||
22 | /** |
||
23 | * @var CacheInterface |
||
24 | */ |
||
25 | private $cache; |
||
26 | |||
27 | /** |
||
28 | * @var array |
||
29 | */ |
||
30 | private $cookieParams = []; |
||
31 | |||
32 | /** |
||
33 | * @param string $cookieName |
||
34 | * @param CacheInterface $cache |
||
35 | * @param array $cookieParams |
||
36 | */ |
||
37 | 9 | public function __construct(string $cookieName, CacheInterface $cache, array $cookieParams = []) |
|
43 | |||
44 | 9 | public function __invoke(ServerRequestInterface $request, callable $next) |
|
63 | |||
64 | 9 | private function getId(ServerRequestInterface $request): string |
|
78 | } |
||
79 |
It seems like you are assigning to a variable which was imported through a
use
statement which was not imported by reference.For clarity, we suggest to use a different name or import by reference depending on whether you would like to have the change visibile in outer-scope.
Change not visible in outer-scope
Change visible in outer-scope