@@ -38,6 +38,5 @@ |
||
| 38 | 38 | * Class EntityStateException |
| 39 | 39 | * @package Platine\Orm\Exception |
| 40 | 40 | */ |
| 41 | -class EntityStateException extends RuntimeException |
|
| 42 | -{ |
|
| 41 | +class EntityStateException extends RuntimeException { |
|
| 43 | 42 | } |
@@ -38,6 +38,5 @@ |
||
| 38 | 38 | * Class RelationNotFoundException |
| 39 | 39 | * @package Platine\Orm\Exception |
| 40 | 40 | */ |
| 41 | -class RelationNotFoundException extends RuntimeException |
|
| 42 | -{ |
|
| 41 | +class RelationNotFoundException extends RuntimeException { |
|
| 43 | 42 | } |
@@ -38,6 +38,5 @@ |
||
| 38 | 38 | * Class PropertyNotFoundException |
| 39 | 39 | * @package Platine\Orm\Exception |
| 40 | 40 | */ |
| 41 | -class PropertyNotFoundException extends RuntimeException |
|
| 42 | -{ |
|
| 41 | +class PropertyNotFoundException extends RuntimeException { |
|
| 43 | 42 | } |
@@ -50,8 +50,7 @@ discard block |
||
| 50 | 50 | * Class Junction |
| 51 | 51 | * @package Platine\Orm\Relation |
| 52 | 52 | */ |
| 53 | -class Junction |
|
| 54 | -{ |
|
| 53 | +class Junction { |
|
| 55 | 54 | /** |
| 56 | 55 | * |
| 57 | 56 | * @var array<string, string> |
@@ -69,8 +68,7 @@ discard block |
||
| 69 | 68 | * @param string $table |
| 70 | 69 | * @param array<string, string> $columns |
| 71 | 70 | */ |
| 72 | - public function __construct(string $table, array $columns) |
|
| 73 | - { |
|
| 71 | + public function __construct(string $table, array $columns) { |
|
| 74 | 72 | $this->table = $table; |
| 75 | 73 | $this->columns = $columns; |
| 76 | 74 | } |
@@ -57,8 +57,7 @@ discard block |
||
| 57 | 57 | * Class Query |
| 58 | 58 | * @package Platine\Orm\Query |
| 59 | 59 | */ |
| 60 | -class Query extends BaseStatement |
|
| 61 | -{ |
|
| 60 | +class Query extends BaseStatement { |
|
| 62 | 61 | /** |
| 63 | 62 | * |
| 64 | 63 | * @var HavingStatement |
@@ -94,8 +93,7 @@ discard block |
||
| 94 | 93 | * |
| 95 | 94 | * @param QueryStatement|null $queryStatement |
| 96 | 95 | */ |
| 97 | - public function __construct(QueryStatement $queryStatement = null) |
|
| 98 | - { |
|
| 96 | + public function __construct(QueryStatement $queryStatement = null) { |
|
| 99 | 97 | parent::__construct($queryStatement); |
| 100 | 98 | $this->havingStatement = new HavingStatement($this->queryStatement); |
| 101 | 99 | } |
@@ -103,8 +101,7 @@ discard block |
||
| 103 | 101 | /** |
| 104 | 102 | * Clone the object |
| 105 | 103 | */ |
| 106 | - public function __clone() |
|
| 107 | - { |
|
| 104 | + public function __clone() { |
|
| 108 | 105 | parent::__clone(); |
| 109 | 106 | $this->havingStatement = new HavingStatement($this->queryStatement); |
| 110 | 107 | } |
@@ -55,8 +55,7 @@ |
||
| 55 | 55 | * @package Platine\Orm |
| 56 | 56 | * @template TEntity as Entity |
| 57 | 57 | */ |
| 58 | -interface RepositoryInterface |
|
| 59 | -{ |
|
| 58 | +interface RepositoryInterface { |
|
| 60 | 59 | /** |
| 61 | 60 | * Return the instance of EntityQuery |
| 62 | 61 | * @param string|array<int, string>|array<string, Closure> $with |
@@ -55,8 +55,7 @@ discard block |
||
| 55 | 55 | * @package Platine\Orm\Relation |
| 56 | 56 | * @template TEntity as \Platine\Orm\Entity |
| 57 | 57 | */ |
| 58 | -abstract class Relation |
|
| 59 | -{ |
|
| 58 | +abstract class Relation { |
|
| 60 | 59 | /** |
| 61 | 60 | * Query callback |
| 62 | 61 | * @var callable|null |
@@ -80,8 +79,7 @@ discard block |
||
| 80 | 79 | * @param class-string<TEntity> $entityClass |
| 81 | 80 | * @param ForeignKey|null $foreignKey |
| 82 | 81 | */ |
| 83 | - public function __construct(string $entityClass, ?ForeignKey $foreignKey = null) |
|
| 84 | - { |
|
| 82 | + public function __construct(string $entityClass, ?ForeignKey $foreignKey = null) { |
|
| 85 | 83 | $this->entityClass = $entityClass; |
| 86 | 84 | $this->foreignKey = $foreignKey; |
| 87 | 85 | } |
@@ -61,8 +61,7 @@ discard block |
||
| 61 | 61 | * @template TEntity as Entity |
| 62 | 62 | * @extends Relation<TEntity> |
| 63 | 63 | */ |
| 64 | -abstract class HasRelation extends Relation |
|
| 65 | -{ |
|
| 64 | +abstract class HasRelation extends Relation { |
|
| 66 | 65 | /** |
| 67 | 66 | * Whether is many or not |
| 68 | 67 | * @var bool |
@@ -161,8 +160,7 @@ discard block |
||
| 161 | 160 | * {@inheritedoc} |
| 162 | 161 | * @param DataMapper<TEntity> $mapper |
| 163 | 162 | */ |
| 164 | - public function getResult(DataMapper $mapper, ?callable $callback = null) |
|
| 165 | - { |
|
| 163 | + public function getResult(DataMapper $mapper, ?callable $callback = null) { |
|
| 166 | 164 | $manager = $mapper->getEntityManager(); |
| 167 | 165 | $owner = $mapper->getEntityMapper(); |
| 168 | 166 | $related = $manager->getEntityMapper($this->entityClass); |
@@ -52,8 +52,7 @@ |
||
| 52 | 52 | * @template TEntity as \Platine\Orm\Entity |
| 53 | 53 | * @extends ShareRelation<TEntity> |
| 54 | 54 | */ |
| 55 | -class ShareOne extends ShareRelation |
|
| 56 | -{ |
|
| 55 | +class ShareOne extends ShareRelation { |
|
| 57 | 56 | /** |
| 58 | 57 | * {@inheritedoc} |
| 59 | 58 | */ |