Skip to content

Commit 226f750

Browse files
committed
Docblock
1 parent 52780ed commit 226f750

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/Cookie/ContextCookie.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ abstract class ContextCookie implements ContextAware, WithContext
1111
use ContextAwareTrait;
1212
use WithContextTrait;
1313

14+
/**
15+
* @param ContextAware $ctx
16+
* @param bool $checkQueued
17+
*
18+
* @return static
19+
*/
1420
public static function loaded(ContextAware $ctx, bool $checkQueued = true)
1521
{
1622
return static::withContext($ctx)->read($checkQueued);
@@ -25,11 +31,21 @@ abstract public function name(): string;
2531

2632
abstract public function ttl(): int;
2733

34+
/**
35+
* @param bool $checkQueued
36+
*
37+
* @return bool
38+
*/
2839
public function exists(bool $checkQueued = true)
2940
{
3041
return $this->getContext()->cookies()->has($this->name(), $checkQueued);
3142
}
3243

44+
/**
45+
* @param bool $checkQueued
46+
*
47+
* @return $this
48+
*/
3349
public function read(bool $checkQueued = true)
3450
{
3551
return $this->_setRawValue($this->getContext()->cookies()->read($this->name(), $checkQueued));
@@ -40,18 +56,29 @@ protected function _getRawValue(): ?string
4056
return $this->_rawValue;
4157
}
4258

59+
/**
60+
* @param string $value
61+
*
62+
* @return $this
63+
*/
4364
protected function _setRawValue(string $value)
4465
{
4566
$this->_rawValue = $value;
4667
return $this;
4768
}
4869

70+
/**
71+
* @return $this
72+
*/
4973
public function store()
5074
{
5175
$this->getContext()->cookies()->store($this->name(), $this->_getRawValue(), $this->ttl());
5276
return $this;
5377
}
5478

79+
/**
80+
* @return $this
81+
*/
5582
public function delete()
5683
{
5784
$this->getContext()->cookies()->delete($this->name());

0 commit comments

Comments
 (0)