| Total Complexity | 6 |
| Total Lines | 55 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class SessionCheck implements EnvironmentCheck |
||
| 16 | { |
||
| 17 | use Fetcher; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Set up check with URL |
||
| 21 | * |
||
| 22 | * @param string $url The route, excluding the domain |
||
| 23 | * @inheritdoc |
||
| 24 | */ |
||
| 25 | public function __construct($url = '') |
||
| 26 | { |
||
| 27 | $this->setURL($url); |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Check that the response for URL does not create a session |
||
| 32 | * |
||
| 33 | * @return array |
||
| 34 | */ |
||
| 35 | public function check() |
||
| 50 | ]; |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Get PHPSESSID or SECSESSID cookie set from the response if it exists. |
||
| 55 | * |
||
| 56 | * @param ResponseInterface $response |
||
| 57 | * @return string|null Cookie contents or null if it doesn't exist |
||
| 58 | */ |
||
| 59 | public function getCookie(ResponseInterface $response) |
||
| 72 |