@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * |
| 26 | 26 | * @return ModelInterface[]array |
| 27 | 27 | */ |
| 28 | - public function findBy(array $criteria = []): array; |
|
| 28 | + public function findBy(array $criteria = [ ]): array; |
|
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * @param array $criteria |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * |
| 35 | 35 | * @throws NotUniqueException |
| 36 | 36 | */ |
| 37 | - public function findOneBy(array $criteria = []); |
|
| 37 | + public function findOneBy(array $criteria = [ ]); |
|
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * @param ModelInterface $model |
@@ -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 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | * |
| 46 | 46 | * @return null|ModelInterface |
| 47 | 47 | */ |
| 48 | - public function findOneBy(array $criteria = []) |
|
| 48 | + public function findOneBy(array $criteria = [ ]) |
|
| 49 | 49 | { |
| 50 | 50 | $qb = $this->connection->createQueryBuilder(); |
| 51 | 51 | $qb->select('*')->from($this->getTable())->setMaxResults(1); |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | * |
| 72 | 72 | * @return ModelInterface[]|array |
| 73 | 73 | */ |
| 74 | - public function findBy(array $criteria = []): array |
|
| 74 | + public function findBy(array $criteria = [ ]): array |
|
| 75 | 75 | { |
| 76 | 76 | $qb = $this->connection->createQueryBuilder(); |
| 77 | 77 | $qb->select('*')->from($this->getTable()); |
@@ -83,16 +83,16 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | $rows = $qb->execute()->fetchAll(\PDO::FETCH_ASSOC); |
| 85 | 85 | |
| 86 | - if ([] === $rows) { |
|
| 87 | - return []; |
|
| 86 | + if ([ ] === $rows) { |
|
| 87 | + return [ ]; |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | /** @var ModelInterface $modelClass */ |
| 91 | 91 | $modelClass = $this->getModelClass(); |
| 92 | 92 | |
| 93 | - $models = []; |
|
| 93 | + $models = [ ]; |
|
| 94 | 94 | foreach ($rows as $row) { |
| 95 | - $models[] = $modelClass::fromRow($row); |
|
| 95 | + $models[ ] = $modelClass::fromRow($row); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | return $models; |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | */ |
| 112 | 112 | public function update(ModelInterface $model) |
| 113 | 113 | { |
| 114 | - $this->connection->update($this->getTable(), $model->toRow(), ['id' => $model->getId()]); |
|
| 114 | + $this->connection->update($this->getTable(), $model->toRow(), [ 'id' => $model->getId() ]); |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | /** |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | */ |
| 120 | 120 | public function delete(ModelInterface $model) |
| 121 | 121 | { |
| 122 | - $this->connection->delete($this->getTable(), ['id' => $model->getId()]); |
|
| 122 | + $this->connection->delete($this->getTable(), [ 'id' => $model->getId() ]); |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | /** |