@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | namespace DrMVC; |
4 | 4 |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | namespace DrMVC\Orm; |
4 | 4 | |
@@ -50,15 +50,15 @@ discard block |
||
50 | 50 | public function saveEntity(Entity $entity) |
51 | 51 | { |
52 | 52 | $data = $entity->getData(); |
53 | - $id = (int)$entity->id; |
|
53 | + $id = (int) $entity->id; |
|
54 | 54 | if ($this->findById($id)) { |
55 | 55 | $this->exec( |
56 | - (string)$this->getBuilder()->update($data)->byId($id), |
|
56 | + (string) $this->getBuilder()->update($data)->byId($id), |
|
57 | 57 | $this->getBuilder()->getPlaceholders() |
58 | 58 | ); |
59 | 59 | } else { |
60 | 60 | $this->exec( |
61 | - (string)$this->getBuilder()->insert($data), |
|
61 | + (string) $this->getBuilder()->insert($data), |
|
62 | 62 | $this->getBuilder()->getPlaceholders() |
63 | 63 | ); |
64 | 64 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | public function findById(int $id)//: ?Entity |
72 | 72 | { |
73 | 73 | $entity = $this->getEntity( |
74 | - (string)$this->getBuilder()->select()->byId($id), |
|
74 | + (string) $this->getBuilder()->select()->byId($id), |
|
75 | 75 | $this->getBuilder()->getPlaceholders() |
76 | 76 | ); |
77 | 77 | |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | */ |
131 | 131 | public function deleteEntity(Entity $entity): int |
132 | 132 | { |
133 | - return $this->exec((string)$this->getBuilder()->delete()->byId((int)$entity->getId()), |
|
133 | + return $this->exec((string) $this->getBuilder()->delete()->byId((int) $entity->getId()), |
|
134 | 134 | $this->getBuilder()->getPlaceholders())->rowCount(); |
135 | 135 | } |
136 | 136 | |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | public function findAll(): array |
141 | 141 | { |
142 | 142 | return $this->getEntity( |
143 | - (string)$this->getBuilder()->select(), |
|
143 | + (string) $this->getBuilder()->select(), |
|
144 | 144 | $this->getBuilder()->getPlaceholders() |
145 | 145 | ); |
146 | 146 | } |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | namespace DrMVC\Orm\Interfaces; |
4 | 4 |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | namespace DrMVC\Orm; |
4 | 4 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | private function keyValueFormat(array $keys, array $values): array |
110 | 110 | { |
111 | 111 | return array_map( |
112 | - function (string $key, string $placeholder) { |
|
112 | + function(string $key, string $placeholder) { |
|
113 | 113 | return sprintf('%s = %s', $key, $placeholder); |
114 | 114 | }, |
115 | 115 | array_keys($keys), |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | namespace DrMVC\Orm; |
4 | 4 |