| @@ -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 @@ 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 | |
| @@ -48,7 +48,7 @@ discard block | ||
| 48 | 48 | * | 
| 49 | 49 | * @return null|ModelInterface | 
| 50 | 50 | */ | 
| 51 | - public function findOneBy(array $criteria = []) | |
| 51 | + public function findOneBy(array $criteria = [ ]) | |
| 52 | 52 |      { | 
| 53 | 53 | $qb = $this->getFindByQueryBuilder($criteria)->setMaxResults(1); | 
| 54 | 54 | |
| @@ -68,20 +68,20 @@ discard block | ||
| 68 | 68 | * | 
| 69 | 69 | * @return ModelInterface[]|array | 
| 70 | 70 | */ | 
| 71 | - public function findBy(array $criteria = []): array | |
| 71 | + public function findBy(array $criteria = [ ]): array | |
| 72 | 72 |      { | 
| 73 | 73 | $rows = $this->getFindByQueryBuilder($criteria)->execute()->fetchAll(\PDO::FETCH_ASSOC); | 
| 74 | 74 | |
| 75 | -        if ([] === $rows) { | |
| 76 | - return []; | |
| 75 | +        if ([ ] === $rows) { | |
| 76 | + return [ ]; | |
| 77 | 77 | } | 
| 78 | 78 | |
| 79 | 79 | /** @var ModelInterface $modelClass */ | 
| 80 | 80 | $modelClass = $this->getModelClass(); | 
| 81 | 81 | |
| 82 | - $models = []; | |
| 82 | + $models = [ ]; | |
| 83 | 83 |          foreach ($rows as $row) { | 
| 84 | - $models[] = $modelClass::fromRow($row); | |
| 84 | + $models[ ] = $modelClass::fromRow($row); | |
| 85 | 85 | } | 
| 86 | 86 | |
| 87 | 87 | return $models; | 
| @@ -92,7 +92,7 @@ discard block | ||
| 92 | 92 | * | 
| 93 | 93 | * @return QueryBuilder | 
| 94 | 94 | */ | 
| 95 | - private function getFindByQueryBuilder(array $criteria = []): QueryBuilder | |
| 95 | + private function getFindByQueryBuilder(array $criteria = [ ]): QueryBuilder | |
| 96 | 96 |      { | 
| 97 | 97 | $qb = $this->connection->createQueryBuilder(); | 
| 98 | 98 |          $qb->select('*')->from($this->getTable()); | 
| @@ -118,7 +118,7 @@ discard block | ||
| 118 | 118 | */ | 
| 119 | 119 | public function update(ModelInterface $model) | 
| 120 | 120 |      { | 
| 121 | - $this->connection->update($this->getTable(), $model->toRow(), ['id' => $model->getId()]); | |
| 121 | + $this->connection->update($this->getTable(), $model->toRow(), [ 'id' => $model->getId() ]); | |
| 122 | 122 | } | 
| 123 | 123 | |
| 124 | 124 | /** | 
| @@ -126,7 +126,7 @@ discard block | ||
| 126 | 126 | */ | 
| 127 | 127 | public function delete(ModelInterface $model) | 
| 128 | 128 |      { | 
| 129 | - $this->connection->delete($this->getTable(), ['id' => $model->getId()]); | |
| 129 | + $this->connection->delete($this->getTable(), [ 'id' => $model->getId() ]); | |
| 130 | 130 | } | 
| 131 | 131 | |
| 132 | 132 | /** | 
| @@ -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\Exception; | 
| 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\Exception; | 
| 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\Exception; | 
| 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 | |