Passed
Push — master ( 5f46f3...33b3f8 )
by compolom
06:13
created
src/Orm/Orm.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace DrMVC\Orm;
4 4
 
@@ -53,15 +53,15 @@  discard block
 block discarded – undo
53 53
     public function saveEntity(Entity $entity): PDOStatement
54 54
     {
55 55
         $data = $entity->getData();
56
-        $id = (int)$entity->id;
56
+        $id = (int) $entity->id;
57 57
         if ($id > 0 && $this->findById($id)) {
58 58
             $result = $this->exec(
59
-                (string)$this->getBuilder()->update($data)->byId($id),
59
+                (string) $this->getBuilder()->update($data)->byId($id),
60 60
                 $this->getBuilder()->getPlaceholders()
61 61
             );
62 62
         } else {
63 63
             $result = $this->exec(
64
-                (string)$this->getBuilder()->insert($data),
64
+                (string) $this->getBuilder()->insert($data),
65 65
                 $this->getBuilder()->getPlaceholders()
66 66
             );
67 67
         }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     public function findById(int $id)//: ?Entity
77 77
     {
78 78
         $entity = $this->getEntity(
79
-            (string)$this->getBuilder()->select()->byId($id),
79
+            (string) $this->getBuilder()->select()->byId($id),
80 80
             $this->getBuilder()->getPlaceholders()
81 81
         );
82 82
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      */
137 137
     public function deleteEntity(Entity $entity): int
138 138
     {
139
-        return $this->exec((string)$this->getBuilder()->delete()->byId((int)$entity->id),
139
+        return $this->exec((string) $this->getBuilder()->delete()->byId((int) $entity->id),
140 140
             $this->getBuilder()->getPlaceholders())->rowCount();
141 141
     }
142 142
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
     public function findAll(): array
147 147
     {
148 148
         return $this->getEntity(
149
-            (string)$this->getBuilder()->select(),
149
+            (string) $this->getBuilder()->select(),
150 150
             $this->getBuilder()->getPlaceholders()
151 151
         );
152 152
     }
Please login to merge, or discard this patch.