@@ -50,8 +50,7 @@ |
||
50 | 50 | * Class HasOne |
51 | 51 | * @package Platine\Orm\Relation |
52 | 52 | */ |
53 | -class HasOne extends HasRelation |
|
54 | -{ |
|
53 | +class HasOne extends HasRelation { |
|
55 | 54 | /** |
56 | 55 | * {@inheritedoc} |
57 | 56 | */ |
@@ -55,8 +55,7 @@ discard block |
||
55 | 55 | * Class RelationLoader |
56 | 56 | * @package Platine\Orm\Relation |
57 | 57 | */ |
58 | -class RelationLoader |
|
59 | -{ |
|
58 | +class RelationLoader { |
|
60 | 59 | /** |
61 | 60 | * |
62 | 61 | * @var EntityQuery |
@@ -123,8 +122,7 @@ discard block |
||
123 | 122 | * @param DataMapper $mapper |
124 | 123 | * @return null|Entity|array<int, Entity> |
125 | 124 | */ |
126 | - public function getResult(DataMapper $mapper) |
|
127 | - { |
|
125 | + public function getResult(DataMapper $mapper) { |
|
128 | 126 | $results = $this->loadResults(); |
129 | 127 | |
130 | 128 | if ($this->inverse) { |
@@ -50,8 +50,7 @@ |
||
50 | 50 | * Class ShareMany |
51 | 51 | * @package Platine\Orm\Relation |
52 | 52 | */ |
53 | -class ShareMany extends ShareRelation |
|
54 | -{ |
|
53 | +class ShareMany extends ShareRelation { |
|
55 | 54 | /** |
56 | 55 | * {@inheritedoc} |
57 | 56 | */ |
@@ -54,8 +54,7 @@ discard block |
||
54 | 54 | * Class Relation |
55 | 55 | * @package Platine\Orm\Relation |
56 | 56 | */ |
57 | -abstract class Relation |
|
58 | -{ |
|
57 | +abstract class Relation { |
|
59 | 58 | /** |
60 | 59 | * Query callback |
61 | 60 | * @var callable|null |
@@ -79,8 +78,7 @@ discard block |
||
79 | 78 | * @param class-string $entityClass |
80 | 79 | * @param ForeignKey|null $foreignKey |
81 | 80 | */ |
82 | - public function __construct(string $entityClass, ?ForeignKey $foreignKey = null) |
|
83 | - { |
|
81 | + public function __construct(string $entityClass, ?ForeignKey $foreignKey = null) { |
|
84 | 82 | $this->entityClass = $entityClass; |
85 | 83 | $this->foreignKey = $foreignKey; |
86 | 84 | } |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | * Class HasRelation |
60 | 60 | * @package Platine\Orm\Relation |
61 | 61 | */ |
62 | -abstract class HasRelation extends Relation |
|
63 | -{ |
|
62 | +abstract class HasRelation extends Relation { |
|
64 | 63 | /** |
65 | 64 | * Whether is many or not |
66 | 65 | * @var bool |
@@ -156,8 +155,7 @@ discard block |
||
156 | 155 | /** |
157 | 156 | * {@inheritedoc} |
158 | 157 | */ |
159 | - public function getResult(DataMapper $mapper, ?callable $callback = null) |
|
160 | - { |
|
158 | + public function getResult(DataMapper $mapper, ?callable $callback = null) { |
|
161 | 159 | $manager = $mapper->getEntityManager(); |
162 | 160 | $owner = $mapper->getEntityMapper(); |
163 | 161 | $related = $manager->getEntityMapper($this->entityClass); |
@@ -62,8 +62,7 @@ discard block |
||
62 | 62 | * Class BelongsTo |
63 | 63 | * @package Platine\Orm\Relation |
64 | 64 | */ |
65 | -class BelongsTo extends Relation |
|
66 | -{ |
|
65 | +class BelongsTo extends Relation { |
|
67 | 66 | /** |
68 | 67 | * |
69 | 68 | * @param DataMapper $owner |
@@ -151,8 +150,7 @@ discard block |
||
151 | 150 | * {@inheritedoc} |
152 | 151 | * @return Entity|null |
153 | 152 | */ |
154 | - public function getResult(DataMapper $mapper, ?callable $callback = null) |
|
155 | - { |
|
153 | + public function getResult(DataMapper $mapper, ?callable $callback = null) { |
|
156 | 154 | $manager = $mapper->getEntityManager(); |
157 | 155 | $related = $manager->getEntityMapper($this->entityClass); |
158 | 156 |
@@ -57,8 +57,7 @@ discard block |
||
57 | 57 | * Class EntityManager |
58 | 58 | * @package Platine\Orm |
59 | 59 | */ |
60 | -class EntityManager |
|
61 | -{ |
|
60 | +class EntityManager { |
|
62 | 61 | /** |
63 | 62 | * The connection |
64 | 63 | * @var Connection |
@@ -81,8 +80,7 @@ discard block |
||
81 | 80 | * Create new instance |
82 | 81 | * @param Connection $connection |
83 | 82 | */ |
84 | - public function __construct(Connection $connection) |
|
85 | - { |
|
83 | + public function __construct(Connection $connection) { |
|
86 | 84 | $this->connection = $connection; |
87 | 85 | $this->dateFormat = $connection->getDriver()->getDateFormat(); |
88 | 86 | } |