1 | <?php |
||
9 | final class CookieSettings |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $name; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | private $domain; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $expire; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $path; |
||
30 | |||
31 | /** |
||
32 | * @var bool |
||
33 | */ |
||
34 | private $secure; |
||
35 | /** |
||
36 | * @var bool |
||
37 | */ |
||
38 | private $httpOnly; |
||
39 | |||
40 | /** |
||
41 | * @param string $name |
||
42 | * @param string $domain |
||
43 | * @param string $expire |
||
44 | * @param string $path |
||
45 | * @param bool $secure |
||
46 | * @param bool $httpOnly |
||
47 | */ |
||
48 | public function __construct($name, $domain, $expire, $path, $secure, $httpOnly) |
||
92 | |||
93 | /** |
||
94 | * The the value for this cookie from the request, null if doesn't exist. |
||
95 | * |
||
96 | * @param Request $request |
||
97 | * @return string|null |
||
98 | */ |
||
99 | public function value(Request $request) |
||
103 | |||
104 | public function toCookie($value) |
||
116 | } |
||
117 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.