Issues (11)

example/index.php (1 issue)

1
<?php
2
3
use Enjoys\Cookie\Cookie;
4
5
include __DIR__."/../vendor/autoload.php";
6
//
7
//
8
//$cookieOptions = new \Enjoys\Cookie\Options();
9
//$cookieOptions->setDomain(false);
10
//$cookieOptions->setPath('/');
11
//$cookieOptions->setHttponly(true);
12
13
$cookie = new Cookie(new \Enjoys\Cookie\Options());
14
15
16
17
$cookie->set('token', '<>', 'session');
18
$cookie->setRaw('token4', '<>', 'session');
19
$cookie->set('token2', time(), 3600, [
20
'samesite' => 'strict'
21
]);
22
var_dump(Cookie::has('token4'));
0 ignored issues
show
Bug Best Practice introduced by
The method Enjoys\Cookie\Cookie::has() is not static, but was called statically. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

22
var_dump(Cookie::/** @scrutinizer ignore-call */ has('token4'));
Loading history...
23
//var_dump($cookie);
24
//var_dump($_COOKIE);
25