@@ -59,7 +59,7 @@ |
||
| 59 | 59 | * @param object $object The object whose class to add. |
| 60 | 60 | * @return Name The name with added class. |
| 61 | 61 | */ |
| 62 | - public function for(object $object): Name |
|
| 62 | + public function for (object $object): Name |
|
| 63 | 63 | { |
| 64 | 64 | return new Name( |
| 65 | 65 | $this->prefix, |
@@ -76,8 +76,8 @@ |
||
| 76 | 76 | add($this->paths, [sprintf( |
| 77 | 77 | '%s:%s', |
| 78 | 78 | isObject($value) ? classOf($value) : typeOf($value), |
| 79 | - $name |
|
| 80 | - )]) |
|
| 79 | + $name |
|
| 80 | + )]) |
|
| 81 | 81 | ); |
| 82 | 82 | } |
| 83 | 83 | } |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | $properties = self::addTo($properties, $level, $reflection); |
| 43 | 43 | ++$level; |
| 44 | 44 | $reflection = $reflection->getParentClass(); |
| 45 | - } while($reflection); |
|
| 45 | + } while ($reflection); |
|
| 46 | 46 | ReflectionProperties::$cache[$theClass] = new self(...$properties); |
| 47 | 47 | } |
| 48 | 48 | return ReflectionProperties::$cache[$theClass]; |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | $this->visited = $visited; |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - public static function for($entity, Map $identityMap): self |
|
| 31 | + public static function for ($entity, Map $identityMap): self |
|
| 32 | 32 | { |
| 33 | 33 | return new self( |
| 34 | 34 | $entity, |
@@ -115,8 +115,7 @@ discard block |
||
| 115 | 115 | public function forProperty(ReflectionProperty $property): self |
| 116 | 116 | { |
| 117 | 117 | $name = $this->isTheOwner() ? |
| 118 | - $this->name : |
|
| 119 | - $this->name->for($this->value); |
|
| 118 | + $this->name : $this->name->for($this->value); |
|
| 120 | 119 | |
| 121 | 120 | return new self( |
| 122 | 121 | $property->getValue($this->value), |
@@ -60,8 +60,7 @@ |
||
| 60 | 60 | } |
| 61 | 61 | if (empty($properties)) { |
| 62 | 62 | return $request->isTheOwner() ? |
| 63 | - [] : |
|
| 64 | - [PropertyState::with((string) $request->objectName(), null)]; |
|
| 63 | + [] : [PropertyState::with((string) $request->objectName(), null)]; |
|
| 65 | 64 | } |
| 66 | 65 | return these(...$properties); |
| 67 | 66 | } |
@@ -131,7 +131,7 @@ |
||
| 131 | 131 | ): RepresentsEntity { |
| 132 | 132 | return EntityState::ofThe(classOfThe($entity), $id, PropertyStates::list( |
| 133 | 133 | ...$this->extractor->extract( |
| 134 | - ExtractionRequest::for($entity, $map) |
|
| 134 | + ExtractionRequest::for ($entity, $map) |
|
| 135 | 135 | ) |
| 136 | 136 | )); |
| 137 | 137 | } |
@@ -131,8 +131,9 @@ |
||
| 131 | 131 | ): RepresentsEntity { |
| 132 | 132 | return EntityState::ofThe(classOfThe($entity), $id, PropertyStates::list( |
| 133 | 133 | ...$this->extractor->extract( |
| 134 | - ExtractionRequest::for($entity, $map) |
|
| 135 | - ) |
|
| 134 | + ExtractionRequest::for($entity, $map) { |
|
| 135 | + ) |
|
| 136 | 136 | )); |
| 137 | + } |
|
| 137 | 138 | } |
| 138 | 139 | } |