@@ -51,8 +51,7 @@ |
||
| 51 | 51 | use Platine\Container\Exception\ContainerException; |
| 52 | 52 | use Platine\Container\Exception\NotFoundException; |
| 53 | 53 | |
| 54 | -interface ContainerInterface |
|
| 55 | -{ |
|
| 54 | +interface ContainerInterface { |
|
| 56 | 55 | |
| 57 | 56 | /** |
| 58 | 57 | * Finds an entry of the container by its identifier and returns it. |
@@ -32,7 +32,6 @@ |
||
| 32 | 32 | |
| 33 | 33 | namespace Platine\Container\Exception; |
| 34 | 34 | |
| 35 | -class NotFoundException extends ContainerException |
|
| 36 | -{ |
|
| 35 | +class NotFoundException extends ContainerException { |
|
| 37 | 36 | |
| 38 | 37 | } |
@@ -50,8 +50,7 @@ |
||
| 50 | 50 | use Platine\Container\ContainerInterface; |
| 51 | 51 | use Platine\Container\ParameterCollection; |
| 52 | 52 | |
| 53 | -interface ResolverInterface |
|
| 54 | -{ |
|
| 53 | +interface ResolverInterface { |
|
| 55 | 54 | |
| 56 | 55 | /** |
| 57 | 56 | * Resolve the instance of the given type |
@@ -52,8 +52,7 @@ |
||
| 52 | 52 | use ReflectionException; |
| 53 | 53 | use ReflectionParameter; |
| 54 | 54 | |
| 55 | -class ConstructorResolver implements ResolverInterface |
|
| 56 | -{ |
|
| 55 | +class ConstructorResolver implements ResolverInterface { |
|
| 57 | 56 | |
| 58 | 57 | /** |
| 59 | 58 | * {@inheritdoc} |
@@ -49,8 +49,7 @@ |
||
| 49 | 49 | |
| 50 | 50 | use Platine\Container\ContainerInterface; |
| 51 | 51 | |
| 52 | -interface StorageInterface |
|
| 53 | -{ |
|
| 52 | +interface StorageInterface { |
|
| 54 | 53 | |
| 55 | 54 | /** |
| 56 | 55 | * Return the name of the storage |
@@ -51,8 +51,7 @@ discard block |
||
| 51 | 51 | use Platine\Container\ParameterCollection; |
| 52 | 52 | use Platine\Container\ParameterInterface; |
| 53 | 53 | |
| 54 | -class ParameterCollection |
|
| 55 | -{ |
|
| 54 | +class ParameterCollection { |
|
| 56 | 55 | |
| 57 | 56 | /** |
| 58 | 57 | * The array of parameters |
@@ -71,8 +70,7 @@ discard block |
||
| 71 | 70 | * |
| 72 | 71 | * @param ParameterInterface[] $parameters the container parameters |
| 73 | 72 | */ |
| 74 | - public function __construct(array $parameters = []) |
|
| 75 | - { |
|
| 73 | + public function __construct(array $parameters = []) { |
|
| 76 | 74 | foreach ($parameters as $parameter) { |
| 77 | 75 | if (!$parameter instanceof ParameterInterface) { |
| 78 | 76 | throw new InvalidArgumentException(sprintf( |
@@ -53,8 +53,7 @@ discard block |
||
| 53 | 53 | use Platine\Container\ParameterCollection; |
| 54 | 54 | use Platine\Container\StorageInterface; |
| 55 | 55 | |
| 56 | -class Storage implements StorageInterface |
|
| 57 | -{ |
|
| 56 | +class Storage implements StorageInterface { |
|
| 58 | 57 | |
| 59 | 58 | /** |
| 60 | 59 | * The storage name |
@@ -119,8 +118,7 @@ discard block |
||
| 119 | 118 | /** |
| 120 | 119 | * {@inheritdoc} |
| 121 | 120 | */ |
| 122 | - public function getInstance(ContainerInterface $container) |
|
| 123 | - { |
|
| 121 | + public function getInstance(ContainerInterface $container) { |
|
| 124 | 122 | return ($this->closure)($container, $this->parameters); |
| 125 | 123 | } |
| 126 | 124 | |
@@ -35,7 +35,6 @@ |
||
| 35 | 35 | |
| 36 | 36 | use Exception; |
| 37 | 37 | |
| 38 | -class ContainerException extends Exception |
|
| 39 | -{ |
|
| 38 | +class ContainerException extends Exception { |
|
| 40 | 39 | |
| 41 | 40 | } |
@@ -49,8 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | use InvalidArgumentException; |
| 51 | 51 | |
| 52 | -class StorageCollection |
|
| 53 | -{ |
|
| 52 | +class StorageCollection { |
|
| 54 | 53 | |
| 55 | 54 | /** |
| 56 | 55 | * The array of storages |
@@ -69,8 +68,7 @@ discard block |
||
| 69 | 68 | * |
| 70 | 69 | * @param StorageInterface[] $storages the container storages |
| 71 | 70 | */ |
| 72 | - public function __construct(array $storages = []) |
|
| 73 | - { |
|
| 71 | + public function __construct(array $storages = []) { |
|
| 74 | 72 | foreach ($storages as $storage) { |
| 75 | 73 | if (!$storage instanceof StorageInterface) { |
| 76 | 74 | throw new InvalidArgumentException(sprintf( |