Passed
Pull Request — master (#1)
by Enjoys
10:16
created
tests/CookieTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     /**
41 41
      * @runInSeparateProcess
42 42
      */
43
-    public function testDeleteCookie(){
43
+    public function testDeleteCookie() {
44 44
         $request = $this->request->withCookieParams([
45 45
             'cookie_key' => 'cookie_value'
46 46
         ]);
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     /**
56 56
      * @runInSeparateProcess
57 57
      */
58
-    public function testSetCookieFailedByExpired(){
58
+    public function testSetCookieFailedByExpired() {
59 59
         $cookie = new Cookie(new Options($this->request));
60 60
         $this->assertSame(true, $cookie->set('key', 'value', false));
61 61
         $this->assertSame(true, $cookie->setRaw('keyRaw', 'value', false));
Please login to merge, or discard this patch.
src/Options.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
         $this->options['expires'] = $expires;
67 67
     }
68 68
 
69
-    public function setDomain(bool|string $domain): void
69
+    public function setDomain(bool | string $domain): void
70 70
     {
71 71
         $this->options['domain'] = $domain;
72 72
     }
Please login to merge, or discard this patch.
src/Expires.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     /**
13 13
      * @throws Exception
14 14
      */
15
-    public function __construct(bool|int|string|\DateTimeInterface $ttl, int $currentTimestamp = null)
15
+    public function __construct(bool | int | string | \DateTimeInterface $ttl, int $currentTimestamp = null)
16 16
     {
17 17
         $this->currentTimestamp = $currentTimestamp ?? time();
18 18
         $this->setExpires($ttl);
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      * @throws Exception
23 23
      * @see http://php.net/manual/ru/datetime.formats.relative.php
24 24
      */
25
-    private function setExpires(bool|int|string|\DateTimeInterface $ttl): void
25
+    private function setExpires(bool | int | string | \DateTimeInterface $ttl): void
26 26
     {
27 27
         if ($ttl instanceof \DateTimeInterface) {
28 28
             $this->expires = $ttl->getTimestamp();
Please login to merge, or discard this patch.
src/Cookie.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
     {
11 11
     }
12 12
 
13
-    public function get(string $key = null): null|array|string
13
+    public function get(string $key = null): null | array | string
14 14
     {
15 15
         /** @var string[] $cookie */
16 16
         $cookie = $this->options->getRequest()->getCookieParams();
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public function set(
51 51
         string $key,
52 52
         string $value,
53
-        bool|int|string|\DateTimeInterface $ttl = true,
53
+        bool | int | string | \DateTimeInterface $ttl = true,
54 54
         array $addedOptions = []
55 55
     ): bool {
56 56
         $setParams = $this->getSetParams($key, $value, $ttl, $addedOptions);
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     public function setRaw(
87 87
         string $key,
88 88
         string $value,
89
-        bool|int|string|\DateTimeInterface $ttl = true,
89
+        bool | int | string | \DateTimeInterface $ttl = true,
90 90
         array $addedOptions = []
91 91
     ): bool {
92 92
         $setParams = $this->getSetParams($key, $value, $ttl, $addedOptions);
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     private function getSetParams(
124 124
         string $key,
125 125
         string $value,
126
-        bool|int|string|\DateTimeInterface $ttl,
126
+        bool | int | string | \DateTimeInterface $ttl,
127 127
         array $addedOptions = []
128 128
     ): array {
129 129
         $expires = new Expires($ttl);
Please login to merge, or discard this patch.