@@ -40,6 +40,7 @@ discard block |
||
40 | 40 | * @param ModelInterface $model |
41 | 41 | * |
42 | 42 | * @throws AlreadyKnownException |
43 | + * @return void |
|
43 | 44 | */ |
44 | 45 | public function insert(ModelInterface $model); |
45 | 46 | |
@@ -47,6 +48,7 @@ discard block |
||
47 | 48 | * @param ModelInterface $model |
48 | 49 | * |
49 | 50 | * @throws UnknownException |
51 | + * @return void |
|
50 | 52 | */ |
51 | 53 | public function update(ModelInterface $model); |
52 | 54 | |
@@ -54,6 +56,7 @@ discard block |
||
54 | 56 | * @param ModelInterface $model |
55 | 57 | * |
56 | 58 | * @throws UnknownException |
59 | + * @return void |
|
57 | 60 | */ |
58 | 61 | public function delete(ModelInterface $model); |
59 | 62 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Chubbyphp\Model; |
6 | 6 | |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | * |
28 | 28 | * @return ModelInterface[]array |
29 | 29 | */ |
30 | - public function findBy(array $criteria = []): array; |
|
30 | + public function findBy(array $criteria = [ ]): array; |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * @param array $criteria |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * |
37 | 37 | * @throws NotUniqueException |
38 | 38 | */ |
39 | - public function findOneBy(array $criteria = []); |
|
39 | + public function findOneBy(array $criteria = [ ]); |
|
40 | 40 | |
41 | 41 | /** |
42 | 42 | * @param ModelInterface $model |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Chubbyphp\Model; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Chubbyphp\Model; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Chubbyphp\Model; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Chubbyphp\Model; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Chubbyphp\Model; |
6 | 6 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Chubbyphp\Model\Cache; |
6 | 6 | |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | /** |
12 | 12 | * @var ModelInterface[]|array |
13 | 13 | */ |
14 | - private $cache = []; |
|
14 | + private $cache = [ ]; |
|
15 | 15 | |
16 | 16 | /** |
17 | 17 | * @param ModelInterface $model |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | public function set(ModelInterface $model): ModelCacheInterface |
22 | 22 | { |
23 | - $this->cache[$model->getId()] = $model; |
|
23 | + $this->cache[ $model->getId() ] = $model; |
|
24 | 24 | |
25 | 25 | return $this; |
26 | 26 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | throw ModelNotFoundException::fromId($id); |
49 | 49 | } |
50 | 50 | |
51 | - return $this->cache[$id]; |
|
51 | + return $this->cache[ $id ]; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function remove(string $id): ModelCacheInterface |
60 | 60 | { |
61 | - unset($this->cache[$id]); |
|
61 | + unset($this->cache[ $id ]); |
|
62 | 62 | |
63 | 63 | return $this; |
64 | 64 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Chubbyphp\Model; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Chubbyphp\Model; |
6 | 6 |