Passed
Push — develop ( 3ce561...bf3f40 )
by nguereza
02:28
created
src/Exception/EntityStateException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,6 +38,5 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Exception/RelationNotFoundException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,6 +38,5 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Exception/PropertyNotFoundException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,6 +38,5 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Mapper/EntityMapperInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
  * Class EntityMapperInterface
53 53
  * @package Platine\Orm\Mapper
54 54
  */
55
-interface EntityMapperInterface
56
-{
55
+interface EntityMapperInterface {
57 56
     /**
58 57
      * The name of the entity
59 58
      * @param string $name
Please login to merge, or discard this patch.
src/Mapper/EntityMapper.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@  discard block
 block discarded – undo
55 55
  * Class EntityMapper
56 56
  * @package Platine\Orm\Mapper
57 57
  */
58
-class EntityMapper implements EntityMapperInterface
59
-{
58
+class EntityMapper implements EntityMapperInterface {
60 59
     /**
61 60
      * The name of the entity
62 61
      * @var string
@@ -177,8 +176,7 @@  discard block
 block discarded – undo
177 176
      * Create new instance
178 177
      * @param string $entityClass
179 178
      */
180
-    public function __construct(string $entityClass)
181
-    {
179
+    public function __construct(string $entityClass) {
182 180
         $this->entityClass = $entityClass;
183 181
     }
184 182
 
@@ -435,15 +433,13 @@  discard block
 block discarded – undo
435 433
             $primaryKey = $this->getPrimaryKey();
436 434
             $prefix = $this->getName();
437 435
 
438
-            $this->foreignKey = new class ($primaryKey, $prefix) extends ForeignKey
439
-            {
436
+            $this->foreignKey = new class ($primaryKey, $prefix) extends ForeignKey {
440 437
                 /**
441 438
                  *
442 439
                  * @param PrimaryKey $primaryKey
443 440
                  * @param string $prefix
444 441
                  */
445
-                public function __construct(PrimaryKey $primaryKey, string $prefix)
446
-                {
442
+                public function __construct(PrimaryKey $primaryKey, string $prefix) {
447 443
                     /** @var array<string, string> $columns */
448 444
                     $columns = [];
449 445
 
@@ -462,8 +458,7 @@  discard block
 block discarded – undo
462 458
      *
463 459
      * @return callable|null
464 460
      */
465
-    public function getPrimaryKeyGenerator()
466
-    {
461
+    public function getPrimaryKeyGenerator() {
467 462
         return $this->primaryKeyGenerator;
468 463
     }
469 464
 
Please login to merge, or discard this patch.
src/RepositoryInterface.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@
 block discarded – undo
53 53
  * Class RepositoryInterface
54 54
  * @package Platine\Orm
55 55
  */
56
-interface RepositoryInterface
57
-{
56
+interface RepositoryInterface {
58 57
     /**
59 58
      * Return the instance of EntityQuery
60 59
      * @param string|array<int, string>|array<string, Closure> $with
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
@@ -52,8 +52,7 @@  discard block
 block discarded – undo
52 52
  * Class RelationFactory
53 53
  * @package Platine\Orm\Relation
54 54
  */
55
-class RelationFactory
56
-{
55
+class RelationFactory {
57 56
     /**
58 57
      * The relation name
59 58
      * @var string
@@ -71,8 +70,7 @@  discard block
 block discarded – undo
71 70
      * @param string $name
72 71
      * @param Closure $callback
73 72
      */
74
-    public function __construct(string $name, Closure $callback)
75
-    {
73
+    public function __construct(string $name, Closure $callback) {
76 74
         $this->name = $name;
77 75
         $this->callback = $callback;
78 76
     }
Please login to merge, or discard this patch.
src/Relation/HasMany.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 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
      */
Please login to merge, or discard this patch.
src/Relation/PrimaryKey.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.