| Total Complexity | 13 |
| Total Lines | 92 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class Cookie extends \Symfony\Component\HttpFoundation\Cookie |
||
| 6 | { |
||
| 7 | public function setName($name) |
||
| 8 | { |
||
| 9 | $this->name = $name; |
||
| 10 | return $this; |
||
| 11 | } |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @param $value |
||
| 15 | * @return $this |
||
| 16 | */ |
||
| 17 | public function setValue($value): self |
||
| 18 | { |
||
| 19 | $this->value = $value; |
||
| 20 | |||
| 21 | return $this; |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param $domain |
||
| 26 | * @return $this |
||
| 27 | */ |
||
| 28 | public function setDomain($domain): self |
||
| 29 | { |
||
| 30 | $this->domain = $domain; |
||
| 31 | |||
| 32 | return $this; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function setPath($path): self |
||
| 40 | } |
||
| 41 | |||
| 42 | public function setExpire($expire) |
||
| 43 | { |
||
| 44 | $this->expire = $expire; |
||
| 45 | |||
| 46 | return $this; |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return int |
||
| 51 | */ |
||
| 52 | public function getExpire() |
||
| 53 | { |
||
| 54 | return $this->getExpiresTime(); |
||
| 55 | } |
||
| 56 | |||
| 57 | public function setExpireTimer($expires) |
||
| 58 | { |
||
| 59 | $this->expire = time() + $expires; |
||
| 60 | |||
| 61 | return $this; |
||
| 62 | } |
||
| 63 | |||
| 64 | public function setSecured($secured) |
||
| 69 | } |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @return bool |
||
| 73 | */ |
||
| 74 | public function isExpired(): bool |
||
| 80 | } |
||
| 81 | } |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @return bool |
||
| 85 | */ |
||
| 86 | public function save(): bool |
||
| 97 | ); |
||
| 98 | } |
||
| 100 |