These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * |
||
4 | */ |
||
5 | |||
6 | namespace Mvc5\Cookie\Config; |
||
7 | |||
8 | use Mvc5\Cookie\Cookies as _Cookies; |
||
9 | |||
10 | trait Cookies |
||
11 | { |
||
12 | /** |
||
13 | * |
||
14 | */ |
||
15 | use Container; |
||
16 | |||
17 | /** |
||
18 | * @var _Cookies |
||
19 | */ |
||
20 | protected $cookies; |
||
21 | |||
22 | /** |
||
23 | * @param _Cookies $cookies |
||
24 | * @param array $config |
||
25 | */ |
||
26 | 5 | function __construct(_Cookies $cookies, array $config = []) |
|
0 ignored issues
–
show
|
|||
27 | { |
||
28 | 5 | $this->config = $config; |
|
29 | 5 | $this->cookies = $cookies; |
|
30 | 5 | } |
|
31 | |||
32 | /** |
||
33 | * @param string $name |
||
34 | * @param string $path |
||
35 | * @param string $domain |
||
36 | * @param bool|false $secure |
||
37 | * @param bool|true $httponly |
||
38 | */ |
||
39 | 3 | function remove($name, $path = null, $domain = null, $secure = null, $httponly = null) |
|
0 ignored issues
–
show
|
|||
40 | { |
||
41 | 3 | $this->cookies->remove($name, $path, $domain, $secure, $httponly); |
|
42 | 3 | } |
|
43 | |||
44 | /** |
||
45 | * @param string $name |
||
46 | * @param string $value |
||
47 | * @param int $expire |
||
48 | * @param string $path |
||
49 | * @param string $domain |
||
50 | * @param bool|false $secure |
||
51 | * @param bool|true $httponly |
||
52 | * @return string |
||
53 | */ |
||
54 | 1 | function set($name, $value, $expire = null, $path = null, $domain = null, $secure = null, $httponly = null) |
|
0 ignored issues
–
show
|
|||
55 | { |
||
56 | 1 | return $this->cookies->set($name, $value, $expire, $path, $domain, $secure, $httponly); |
|
57 | } |
||
58 | } |
||
59 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.