Passed
Push — develop ( 38bf9c...4f6606 )
by nguereza
12:50
created
src/Relation/RelationLoader.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@
 block discarded – undo
56 56
  * @package Platine\Orm\Relation
57 57
  * @template TEntity as Entity
58 58
  */
59
-class RelationLoader
60
-{
59
+class RelationLoader {
61 60
     /**
62 61
      *
63 62
      * @var EntityQuery<TEntity>
Please login to merge, or discard this patch.
src/Relation/ShareRelation.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -68,8 +68,7 @@  discard block
 block discarded – undo
68 68
  * @template TEntity as Entity
69 69
  * @extends Relation<TEntity>
70 70
  */
71
-abstract class ShareRelation extends Relation
72
-{
71
+abstract class ShareRelation extends Relation {
73 72
     /**
74 73
      * Whether is many or not
75 74
      * @var bool
@@ -222,8 +221,7 @@  discard block
 block discarded – undo
222 221
 
223 222
         $queryStatement = new QueryStatement();
224 223
 
225
-        $select = new class ($manager, $related, $queryStatement, $junctionTable) extends EntityQuery
226
-        {
224
+        $select = new class ($manager, $related, $queryStatement, $junctionTable) extends EntityQuery {
227 225
             /**
228 226
              *
229 227
              * @var string
@@ -338,8 +336,7 @@  discard block
 block discarded – undo
338 336
         $joinTable = $related->getTable();
339 337
 
340 338
         $queryStatement = new QueryStatement();
341
-        $select = new class ($manager, $related, $queryStatement, $junctionTable) extends EntityQuery
342
-        {
339
+        $select = new class ($manager, $related, $queryStatement, $junctionTable) extends EntityQuery {
343 340
             /**
344 341
              *
345 342
              * @var string
@@ -435,15 +432,13 @@  discard block
 block discarded – undo
435 432
      */
436 433
     protected function buildJunction(EntityMapper $owner, EntityMapper $related): Junction
437 434
     {
438
-        return new class ($owner, $related) extends Junction
439
-        {
435
+        return new class ($owner, $related) extends Junction {
440 436
             /**
441 437
              *
442 438
              * @param EntityMapper<TEntity> $owner
443 439
              * @param EntityMapper<TEntity> $related
444 440
              */
445
-            public function __construct(EntityMapper $owner, EntityMapper $related)
446
-            {
441
+            public function __construct(EntityMapper $owner, EntityMapper $related) {
447 442
                 $table = [$owner->getTable(), $related->getTable()];
448 443
                 sort($table);
449 444
                 parent::__construct(implode('_', $table), $related->getForeignKey()->columns());
Please login to merge, or discard this patch.
src/Relation/Relation.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@
 block discarded – undo
56 56
  * @package Platine\Orm\Relation
57 57
  * @template TEntity as Entity
58 58
  */
59
-abstract class Relation
60
-{
59
+abstract class Relation {
61 60
     /**
62 61
      * Query callback
63 62
      * @var callable|null
Please login to merge, or discard this patch.
src/Relation/RelationFactory.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,15 +53,13 @@
 block discarded – undo
53 53
  * @package Platine\Orm\Relation
54 54
  * @template TEntity as \Platine\Orm\Entity
55 55
  */
56
-class RelationFactory
57
-{
56
+class RelationFactory {
58 57
     /**
59 58
      * Create new instance
60 59
      * @param string $name
61 60
      * @param Closure $callback
62 61
      */
63
-    public function __construct(protected string $name, protected Closure $callback)
64
-    {
62
+    public function __construct(protected string $name, protected Closure $callback) {
65 63
     }
66 64
 
67 65
     /**
Please login to merge, or discard this patch.
src/Relation/HasRelation.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Relation/PrimaryKey.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@  discard block
 block discarded – undo
56 56
  * @package Platine\Orm\Relation
57 57
  * @template TEntity as Entity
58 58
  */
59
-class PrimaryKey implements Stringable
60
-{
59
+class PrimaryKey implements Stringable {
61 60
     /**
62 61
      *
63 62
      * @var array<int, string>
@@ -74,8 +73,7 @@  discard block
 block discarded – undo
74 73
      * Create new instance
75 74
      * @param string ...$columns
76 75
      */
77
-    public function __construct(string ...$columns)
78
-    {
76
+    public function __construct(string ...$columns) {
79 77
         $this->columns = array_values($columns);
80 78
         $this->composite = count($columns) > 1;
81 79
     }
Please login to merge, or discard this patch.
src/Relation/ForeignKey.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@  discard block
 block discarded – undo
52 52
  * @class ForeignKey
53 53
  * @package Platine\Orm\Relation
54 54
  */
55
-class ForeignKey implements Stringable
56
-{
55
+class ForeignKey implements Stringable {
57 56
     /**
58 57
      *
59 58
      * @var array<string, string>
@@ -70,8 +69,7 @@  discard block
 block discarded – undo
70 69
      * Create new instance
71 70
      * @param array<string, string> $columns
72 71
      */
73
-    public function __construct(array $columns)
74
-    {
72
+    public function __construct(array $columns) {
75 73
         $this->columns = $columns;
76 74
         $this->composite = count($columns) > 1;
77 75
     }
Please login to merge, or discard this patch.
src/Relation/Junction.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,15 +50,13 @@
 block discarded – undo
50 50
  * @class Junction
51 51
  * @package Platine\Orm\Relation
52 52
  */
53
-class Junction
54
-{
53
+class Junction {
55 54
     /**
56 55
      * Create new instance
57 56
      * @param string $table
58 57
      * @param array<string, string> $columns
59 58
      */
60
-    public function __construct(protected string $table, protected array $columns)
61
-    {
59
+    public function __construct(protected string $table, protected array $columns) {
62 60
     }
63 61
 
64 62
     /**
Please login to merge, or discard this patch.
src/Relation/BelongsTo.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,8 +64,7 @@
 block discarded – undo
64 64
  * @template TEntity as Entity
65 65
  * @extends Relation<TEntity>
66 66
  */
67
-class BelongsTo extends Relation
68
-{
67
+class BelongsTo extends Relation {
69 68
     /**
70 69
      *
71 70
      * @param DataMapper<TEntity> $owner
Please login to merge, or discard this patch.