@@ -42,7 +42,9 @@ discard block |
||
| 42 | 42 | public function addType(TypeInterface $type) |
| 43 | 43 | { |
| 44 | 44 | $typeName = $this->getTypeName($type); |
| 45 | - if ($this->isTypeNameRegistered($typeName)) return $this; |
|
| 45 | + if ($this->isTypeNameRegistered($typeName)) { |
|
| 46 | + return $this; |
|
| 47 | + } |
|
| 46 | 48 | |
| 47 | 49 | $this->typesList[$typeName] = $type; |
| 48 | 50 | return $this; |
@@ -54,7 +56,9 @@ discard block |
||
| 54 | 56 | } |
| 55 | 57 | |
| 56 | 58 | private function getTypeName($type) { |
| 57 | - if (is_string($type)) return $type; |
|
| 59 | + if (is_string($type)) { |
|
| 60 | + return $type; |
|
| 61 | + } |
|
| 58 | 62 | if (is_object($type) && $type instanceof AbstractType) { |
| 59 | 63 | return $type->getName(); |
| 60 | 64 | } |