Passed
Push — develop ( 3ce561...bf3f40 )
by nguereza
02:28
created
src/Relation/RelationLoader.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/Relation/ShareMany.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@
 block discarded – undo
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
      */
Please login to merge, or discard this patch.
src/Relation/Relation.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Relation/HasRelation.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Relation/BelongsTo.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,8 +62,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/EntityManager.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Mapper/DataMapper.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -318,9 +318,9 @@  discard block
 block discarded – undo
318 318
         }
319 319
     }
320 320
 
321
-     /**
322
-     * {@inheritedoc}
323
-     */
321
+        /**
322
+         * {@inheritedoc}
323
+         */
324 324
     public function hasColumn(string $column): bool
325 325
     {
326 326
         return array_key_exists($column, $this->columns)
@@ -353,9 +353,9 @@  discard block
 block discarded – undo
353 353
         $this->rawColumns[$name] = $value;
354 354
     }
355 355
 
356
-     /**
357
-     * {@inheritedoc}
358
-     */
356
+        /**
357
+         * {@inheritedoc}
358
+         */
359 359
     public function getRelated(string $name, callable $callback = null)
360 360
     {
361 361
         if (array_key_exists($name, $this->relations)) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
         }
260 260
 
261 261
         $primaryKey = $this->mapper->getPrimaryKey();
262
-        if ($name === (string)$primaryKey) {
262
+        if ($name === (string) $primaryKey) {
263 263
             return $this->columns[$name] = $value;
264 264
         }
265 265
 
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
     {
314 314
         unset($this->columns[$name]);
315 315
         
316
-        if($raw){
316
+        if ($raw) {
317 317
             unset($this->rawColumns[$name]);
318 318
         }
319 319
     }
Please login to merge, or discard this patch.
Braces   +6 added lines, -11 removed lines patch added patch discarded remove patch
@@ -67,8 +67,7 @@  discard block
 block discarded – undo
67 67
  * Class DataMapper
68 68
  * @package Platine\Orm\Mapper
69 69
  */
70
-class DataMapper implements DataMapperInterface
71
-{
70
+class DataMapper implements DataMapperInterface {
72 71
     /**
73 72
      * The raw columns data
74 73
      * @var array<string, mixed>
@@ -230,8 +229,7 @@  discard block
 block discarded – undo
230 229
     /**
231 230
      * {@inheritedoc}
232 231
      */
233
-    public function getColumn(string $name)
234
-    {
232
+    public function getColumn(string $name) {
235 233
         if ($this->refresh) {
236 234
             $this->hydrate();
237 235
         }
@@ -313,7 +311,7 @@  discard block
 block discarded – undo
313 311
     {
314 312
         unset($this->columns[$name]);
315 313
         
316
-        if($raw){
314
+        if($raw) {
317 315
             unset($this->rawColumns[$name]);
318 316
         }
319 317
     }
@@ -356,8 +354,7 @@  discard block
 block discarded – undo
356 354
      /**
357 355
      * {@inheritedoc}
358 356
      */
359
-    public function getRelated(string $name, callable $callback = null)
360
-    {
357
+    public function getRelated(string $name, callable $callback = null) {
361 358
         if (array_key_exists($name, $this->relations)) {
362 359
             return $this->relations[$name];
363 360
         }
@@ -616,8 +613,7 @@  discard block
 block discarded – undo
616 613
      *
617 614
      * @return mixed
618 615
      */
619
-    protected function castGet($value, string $type)
620
-    {
616
+    protected function castGet($value, string $type) {
621 617
         $original = $type;
622 618
 
623 619
         if ($type[0] === '?') {
@@ -669,8 +665,7 @@  discard block
 block discarded – undo
669 665
      *
670 666
      * @return mixed
671 667
      */
672
-    protected function castSet($value, string $type)
673
-    {
668
+    protected function castSet($value, string $type) {
674 669
         $original = $type;
675 670
 
676 671
         if ($type[0] === '?') {
Please login to merge, or discard this patch.