@@ -49,8 +49,7 @@ |
||
| 49 | 49 | |
| 50 | 50 | use Platine\Container\ContainerInterface; |
| 51 | 51 | |
| 52 | -interface ParameterInterface |
|
| 53 | -{ |
|
| 52 | +interface ParameterInterface { |
|
| 54 | 53 | /** |
| 55 | 54 | * Return the name of the parameter |
| 56 | 55 | * |
@@ -52,8 +52,7 @@ discard block |
||
| 52 | 52 | use Platine\Container\Exception\ContainerException; |
| 53 | 53 | use Platine\Container\Exception\NotFoundException; |
| 54 | 54 | |
| 55 | -class Container implements ContainerInterface |
|
| 56 | -{ |
|
| 55 | +class Container implements ContainerInterface { |
|
| 57 | 56 | /** |
| 58 | 57 | * The container global instance |
| 59 | 58 | * @var Container|null |
@@ -87,8 +86,7 @@ discard block |
||
| 87 | 86 | /** |
| 88 | 87 | * Create new container instance |
| 89 | 88 | */ |
| 90 | - public function __construct() |
|
| 91 | - { |
|
| 89 | + public function __construct() { |
|
| 92 | 90 | $this->resolver = new ConstructorResolver(); |
| 93 | 91 | $this->storages = new StorageCollection(); |
| 94 | 92 | self::$instance = $this; |
@@ -135,8 +133,7 @@ discard block |
||
| 135 | 133 | * Remove all lock when copy this object |
| 136 | 134 | * @return void |
| 137 | 135 | */ |
| 138 | - public function __clone() |
|
| 139 | - { |
|
| 136 | + public function __clone() { |
|
| 140 | 137 | $this->lock = []; |
| 141 | 138 | } |
| 142 | 139 | |
@@ -251,8 +248,7 @@ discard block |
||
| 251 | 248 | * @param array<string, mixed> $parameters |
| 252 | 249 | * @return mixed |
| 253 | 250 | */ |
| 254 | - public function make(string $id, array $parameters = []) |
|
| 255 | - { |
|
| 251 | + public function make(string $id, array $parameters = []) { |
|
| 256 | 252 | if (isset($this->lock[$id])) { |
| 257 | 253 | throw new ContainerException(sprintf( |
| 258 | 254 | 'Detected a cyclic dependency while provisioning [%s]', |
@@ -286,8 +282,7 @@ discard block |
||
| 286 | 282 | /** |
| 287 | 283 | * {@inheritdoc} |
| 288 | 284 | */ |
| 289 | - public function get(string $id) |
|
| 290 | - { |
|
| 285 | + public function get(string $id) { |
|
| 291 | 286 | if (!$this->has($id)) { |
| 292 | 287 | throw new NotFoundException(sprintf('The type/class [%s] does not exist in the container!', $id)); |
| 293 | 288 | } |