@@ -43,6 +43,6 @@ |
||
| 43 | 43 | */ |
| 44 | 44 | public function getDeprecationReason(): string |
| 45 | 45 | { |
| 46 | - return (string)$this->deprecation; |
|
| 46 | + return (string) $this->deprecation; |
|
| 47 | 47 | } |
| 48 | 48 | } |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | */ |
| 49 | 49 | public function getDescription(): string |
| 50 | 50 | { |
| 51 | - return (string)$this->description; |
|
| 51 | + return (string) $this->description; |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | { |
| 23 | 23 | $name = \ucwords(\mb_strtolower(\preg_replace('/\W+/u', ' ', $name))); |
| 24 | 24 | |
| 25 | - return (string)\str_replace(' ', '', $name); |
|
| 25 | + return (string) \str_replace(' ', '', $name); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -137,7 +137,7 @@ |
||
| 137 | 137 | */ |
| 138 | 138 | public function getDefinition(string $name): ?TypeDefinition |
| 139 | 139 | { |
| 140 | - if (! \in_array($name, $this->types, true)) { |
|
| 140 | + if (!\in_array($name, $this->types, true)) { |
|
| 141 | 141 | return null; |
| 142 | 142 | } |
| 143 | 143 | |
@@ -50,8 +50,8 @@ |
||
| 50 | 50 | private function invoke(string $name, TypeDefinition $from = null): void |
| 51 | 51 | { |
| 52 | 52 | foreach ($this->callbacks as $callback) { |
| 53 | - if (! $this->has($name)) { |
|
| 54 | - $callback($name, $from, function (TypeDefinition $type): void { |
|
| 53 | + if (!$this->has($name)) { |
|
| 54 | + $callback($name, $from, function(TypeDefinition $type): void { |
|
| 55 | 55 | $this->add($type); |
| 56 | 56 | }); |
| 57 | 57 | } |
@@ -12,7 +12,6 @@ |
||
| 12 | 12 | use Railt\Reflection\Contracts\Definition\Behaviour\ProvidesInterfaces; |
| 13 | 13 | use Railt\Reflection\Contracts\Definition\InterfaceDefinition; |
| 14 | 14 | use Railt\Reflection\Contracts\Definition\TypeDefinition; |
| 15 | -use Railt\Reflection\Exception\TypeNotFoundException; |
|
| 16 | 15 | |
| 17 | 16 | /** |
| 18 | 17 | * Trait HasInterfaces |
@@ -110,7 +110,7 @@ |
||
| 110 | 110 | * @version SDL June 2018 |
| 111 | 111 | * @var string |
| 112 | 112 | */ |
| 113 | - public const INTERFACE = 'INTERFACE'; |
|
| 113 | + public const INTERFACE = 'INTERFACE'; |
|
| 114 | 114 | |
| 115 | 115 | /** |
| 116 | 116 | * @version SDL June 2018 |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | */ |
| 71 | 71 | private function bootInheritance(\SplStack $stack, array $children = []): void |
| 72 | 72 | { |
| 73 | - $push = function (string $type) use ($stack): void { |
|
| 73 | + $push = function(string $type) use ($stack): void { |
|
| 74 | 74 | self::$inheritance[$type] = \array_values(\iterator_to_array($stack)); |
| 75 | 75 | self::$inheritance[$type][] = static::ROOT_TYPE; |
| 76 | 76 | |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | */ |
| 75 | 75 | private function verifyExtensionType(TypeDefinition $def): void |
| 76 | 76 | { |
| 77 | - if (! $this::typeOf($def::getType())) { |
|
| 77 | + if (!$this::typeOf($def::getType())) { |
|
| 78 | 78 | $error = \sprintf('Type %s can extends only %s types, but %s given.', $this, static::getType(), $def); |
| 79 | 79 | throw new TypeConflictException($error); |
| 80 | 80 | } |