| Total Complexity | 7 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class SameSite |
||
| 8 | { |
||
| 9 | public const STRICT = 'Strict'; |
||
| 10 | public const LAX = 'Lax'; |
||
| 11 | public const NONE = 'None'; |
||
| 12 | |||
| 13 | private const VALUES = [self::STRICT, self::LAX, self::NONE]; |
||
| 14 | private const DEFAULT = self::LAX; |
||
| 15 | |||
| 16 | /** @var string|null */ |
||
| 17 | private $sameSite; |
||
| 18 | |||
| 19 | public function __construct(?string $sameSite = null, bool $secure = false) |
||
| 22 | } |
||
| 23 | |||
| 24 | public function get(): ?string |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param string|null $sameSite |
||
| 31 | * @param bool $secure |
||
| 32 | * @return string|null |
||
| 33 | */ |
||
| 34 | private function defineValue(?string $sameSite, bool $secure): ?string |
||
| 48 |