Passed
Push — master ( 9363a0...a3ac83 )
by Enjoys
01:50
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/Cookie.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      * @param string|null $key
16 16
      * @return array<string,string>|string|null
17 17
      */
18
-    public function get(?string $key = null): null|array|string
18
+    public function get(?string $key = null): null | array | string
19 19
     {
20 20
         /** @var string[] $cookie */
21 21
         $cookie = $this->options->getRequest()->getCookieParams();
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     public function set(
56 56
         string $key,
57 57
         string $value,
58
-        bool|int|string|\DateTimeInterface $ttl = true,
58
+        bool | int | string | \DateTimeInterface $ttl = true,
59 59
         array $addedOptions = []
60 60
     ): bool {
61 61
         $setParams = $this->getSetParams($key, $value, $ttl, $addedOptions);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     public function setRaw(
92 92
         string $key,
93 93
         string $value,
94
-        bool|int|string|\DateTimeInterface $ttl = true,
94
+        bool | int | string | \DateTimeInterface $ttl = true,
95 95
         array $addedOptions = []
96 96
     ): bool {
97 97
         $setParams = $this->getSetParams($key, $value, $ttl, $addedOptions);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     private function getSetParams(
129 129
         string $key,
130 130
         string $value,
131
-        bool|int|string|\DateTimeInterface $ttl,
131
+        bool | int | string | \DateTimeInterface $ttl,
132 132
         array $addedOptions = []
133 133
     ): array {
134 134
         $expires = new Expires($ttl);
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 NotCorrectTtlString
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 NotCorrectTtlString
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.