Passed
Push — main ( a0e53c...7c5bad )
by Pranjal
12:26 queued 10:28
created
src/Request.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,8 +42,9 @@  discard block
 block discarded – undo
42 42
      */
43 43
     private function getContentValue($key): mixed{
44 44
         if ($this->getContent() && \Safe\json_decode($this->getContent())) {
45
-            if (isset(\Safe\json_decode($this->getContent())->$key))
46
-                return \Safe\json_decode($this->getContent())->$key;
45
+            if (isset(\Safe\json_decode($this->getContent())->$key)) {
46
+                            return \Safe\json_decode($this->getContent())->$key;
47
+            }
47 48
         }
48 49
         return null;
49 50
     }
@@ -65,8 +66,9 @@  discard block
 block discarded – undo
65 66
      */
66 67
     public function all() : array
67 68
     {
68
-        if ($this->getContent() && \Safe\json_decode($this->getContent()))
69
-            return array_merge($this->request->all(), $this->query->all(), \Safe\json_decode($this->getContent(), true));
69
+        if ($this->getContent() && \Safe\json_decode($this->getContent())) {
70
+                    return array_merge($this->request->all(), $this->query->all(), \Safe\json_decode($this->getContent(), true));
71
+        }
70 72
 
71 73
         return array_merge($this->request->all(), $this->query->all());
72 74
 
@@ -80,8 +82,9 @@  discard block
 block discarded – undo
80 82
     public function has(string $key) : bool
81 83
     {
82 84
         if ($this->getContent() && \Safe\json_decode($this->getContent())) {
83
-            if (isset(\Safe\json_decode($this->getContent())->$key))
84
-                return true;
85
+            if (isset(\Safe\json_decode($this->getContent())->$key)) {
86
+                            return true;
87
+            }
85 88
         }
86 89
         if ($this->request->has($key) || $this->query->has($key)) {
87 90
             return true;
Please login to merge, or discard this patch.
src/Adapters/Session/DatabaseHandler.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
         //@codeCoverageIgnoreStart
33 33
         if(function_exists('db')){
34 34
             $this->db = db();
35
-        }else{
35
+        } else{
36 36
             throw new \Exception("This adapter requires scrawler\database");
37 37
         }
38 38
         //@codeCoverageIgnoreEnd
@@ -72,8 +72,9 @@  discard block
 block discarded – undo
72 72
             ->where('sessionid  LIKE ?')
73 73
             ->setParameter(0, $sessionId)
74 74
             ->first();
75
-        if (!is_null($session))
76
-            $this->db->delete($session);
75
+        if (!is_null($session)) {
76
+                    $this->db->delete($session);
77
+        }
77 78
         return true;
78 79
     }
79 80
 
Please login to merge, or discard this patch.