@@ -50,8 +50,7 @@ |
||
50 | 50 | * Class ShareOne |
51 | 51 | * @package Platine\Orm\Relation |
52 | 52 | */ |
53 | -class ShareOne extends ShareRelation |
|
54 | -{ |
|
53 | +class ShareOne extends ShareRelation { |
|
55 | 54 | |
56 | 55 | /** |
57 | 56 | * {@inheritedoc} |
@@ -50,8 +50,7 @@ |
||
50 | 50 | * Class HasMany |
51 | 51 | * @package Platine\Orm\Relation |
52 | 52 | */ |
53 | -class HasMany extends HasRelation |
|
54 | -{ |
|
53 | +class HasMany extends HasRelation { |
|
55 | 54 | /** |
56 | 55 | * {@inheritedoc} |
57 | 56 | */ |
@@ -54,8 +54,7 @@ discard block |
||
54 | 54 | * Class PrimaryKey |
55 | 55 | * @package Platine\Orm\Relation |
56 | 56 | */ |
57 | -class PrimaryKey |
|
58 | -{ |
|
57 | +class PrimaryKey { |
|
59 | 58 | /** |
60 | 59 | * |
61 | 60 | * @var array<int, string> |
@@ -72,8 +71,7 @@ discard block |
||
72 | 71 | * Create new instance |
73 | 72 | * @param string ...$columns |
74 | 73 | */ |
75 | - public function __construct(string ...$columns) |
|
76 | - { |
|
74 | + public function __construct(string ...$columns) { |
|
77 | 75 | $this->columns = $columns; |
78 | 76 | $this->composite = count($columns) > 1; |
79 | 77 | } |
@@ -103,8 +101,7 @@ discard block |
||
103 | 101 | * |
104 | 102 | * @return mixed|array<string, mixed>|null |
105 | 103 | */ |
106 | - public function getValue(array $columns, bool $map = false) |
|
107 | - { |
|
104 | + public function getValue(array $columns, bool $map = false) { |
|
108 | 105 | if (!$this->composite && !$map) { |
109 | 106 | return isset($columns[$this->columns[0]]) |
110 | 107 | ? $columns[$this->columns[0]] |
@@ -129,8 +126,7 @@ discard block |
||
129 | 126 | * |
130 | 127 | * @return mixed|array<string, mixed>|null |
131 | 128 | */ |
132 | - public function getValueFromDataMapper(DataMapper $mapper, bool $map = false) |
|
133 | - { |
|
129 | + public function getValueFromDataMapper(DataMapper $mapper, bool $map = false) { |
|
134 | 130 | return $this->getValue($mapper->getRawColumns(), $map); |
135 | 131 | } |
136 | 132 | |
@@ -140,8 +136,7 @@ discard block |
||
140 | 136 | * @param bool $map |
141 | 137 | * @return mixed|array<string, mixed>|null |
142 | 138 | */ |
143 | - public function getValueFromEntity(Entity $entity, bool $map = false) |
|
144 | - { |
|
139 | + public function getValueFromEntity(Entity $entity, bool $map = false) { |
|
145 | 140 | $columns = Proxy::instance()->getEntityColumns($entity); |
146 | 141 | return $this->getValue($columns, $map); |
147 | 142 | } |
@@ -50,8 +50,7 @@ discard block |
||
50 | 50 | * Class ForeignKey |
51 | 51 | * @package Platine\Orm\Relation |
52 | 52 | */ |
53 | -class ForeignKey |
|
54 | -{ |
|
53 | +class ForeignKey { |
|
55 | 54 | /** |
56 | 55 | * |
57 | 56 | * @var array<string, string> |
@@ -68,8 +67,7 @@ discard block |
||
68 | 67 | * Create new instance |
69 | 68 | * @param array<string, string> $columns |
70 | 69 | */ |
71 | - public function __construct(array $columns) |
|
72 | - { |
|
70 | + public function __construct(array $columns) { |
|
73 | 71 | $this->columns = $columns; |
74 | 72 | $this->composite = count($columns) > 1; |
75 | 73 | } |
@@ -99,8 +97,7 @@ discard block |
||
99 | 97 | * |
100 | 98 | * @return mixed|array<string, mixed>|null |
101 | 99 | */ |
102 | - public function getValue(array $columns, bool $map = false) |
|
103 | - { |
|
100 | + public function getValue(array $columns, bool $map = false) { |
|
104 | 101 | if (!$map && !$this->composite) { |
105 | 102 | $column = array_keys($this->columns); |
106 | 103 | |
@@ -127,8 +124,7 @@ discard block |
||
127 | 124 | * |
128 | 125 | * @return mixed|array<string, mixed>|null |
129 | 126 | */ |
130 | - public function getInverseValue(array $columns, bool $map = false) |
|
131 | - { |
|
127 | + public function getInverseValue(array $columns, bool $map = false) { |
|
132 | 128 | if (!$map && !$this->composite) { |
133 | 129 | $column = array_values($this->columns); |
134 | 130 | |
@@ -154,8 +150,7 @@ discard block |
||
154 | 150 | * |
155 | 151 | * @return mixed|array<string, mixed>|null |
156 | 152 | */ |
157 | - public function extractValue(array $columns, bool $map = false) |
|
158 | - { |
|
153 | + public function extractValue(array $columns, bool $map = false) { |
|
159 | 154 | if (!$map && !$this->composite) { |
160 | 155 | $column = array_values($this->columns); |
161 | 156 |
@@ -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 | } |
@@ -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 | /** |
57 | 56 | * {@inheritedoc} |
@@ -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 | * |
@@ -152,8 +151,7 @@ discard block |
||
152 | 151 | * {@inheritedoc} |
153 | 152 | * @return Entity|null |
154 | 153 | */ |
155 | - public function getResult(DataMapper $mapper, ?callable $callback = null) |
|
156 | - { |
|
154 | + public function getResult(DataMapper $mapper, ?callable $callback = null) { |
|
157 | 155 | $manager = $mapper->getEntityManager(); |
158 | 156 | $related = $manager->getEntityMapper($this->entityClass); |
159 | 157 |