@@ -38,20 +38,20 @@ |
||
38 | 38 | |
39 | 39 | //Срок действия cookie истечет с окончанием сессии (при закрытии браузера). |
40 | 40 | if ($ttl === 0 || $ttl === true || strtolower((string)$ttl) === 'session') { |
41 | - $this->expires = 0; |
|
41 | + $this->expires = 0; |
|
42 | 42 | return; |
43 | 43 | } |
44 | 44 | |
45 | 45 | // Если число то прибавляем значение к метке времени timestamp |
46 | 46 | // Для установки сессионной куки надо использовать FALSE |
47 | 47 | if (is_numeric($ttl)) { |
48 | - $this->expires = $this->currentTimestamp + (int)$ttl; |
|
48 | + $this->expires = $this->currentTimestamp + (int)$ttl; |
|
49 | 49 | return; |
50 | 50 | } |
51 | 51 | |
52 | 52 | if (is_string($ttl)) { |
53 | 53 | if (false !== $returnTtl = strtotime($ttl, $this->currentTimestamp)) { |
54 | - $this->expires = $returnTtl; |
|
54 | + $this->expires = $returnTtl; |
|
55 | 55 | return; |
56 | 56 | } |
57 | 57 | throw new Exception(sprintf('strtotime() failed to convert string "%s" to timestamp', $ttl)); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | |
21 | 21 | $cookieMock = $this->getMockBuilder(Cookie::class)->disableOriginalConstructor()->getMock(); |
22 | 22 | $cookieMock->expects($this->any())->method('set')->willReturnCallback( |
23 | - function ($key, $value) use ($cookie) { |
|
23 | + function($key, $value) use ($cookie) { |
|
24 | 24 | $cookie->set($key, $value, 3600); |
25 | 25 | $_COOKIE[$key] = urlencode($value); |
26 | 26 | return true; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | ); |
29 | 29 | |
30 | 30 | $cookieMock->expects($this->any())->method('setRaw')->willReturnCallback( |
31 | - function ($key, $value) use ($cookie) { |
|
31 | + function($key, $value) use ($cookie) { |
|
32 | 32 | $cookie->setRaw($key, $value, 3600); |
33 | 33 | $_COOKIE[$key] = $value; |
34 | 34 | return true; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | ); |
37 | 37 | |
38 | 38 | $cookieMock->expects($this->any())->method('delete')->willReturnCallback( |
39 | - function ($key) use ($cookie) { |
|
39 | + function($key) use ($cookie) { |
|
40 | 40 | $cookie->delete($key); |
41 | 41 | unset($_COOKIE[$key]); |
42 | 42 | } |