@@ -28,10 +28,10 @@ discard block |
||
28 | 28 | { |
29 | 29 | $scope = self::getAccessor($container)->scope; |
30 | 30 | $result = []; |
31 | - do { |
|
31 | + do{ |
|
32 | 32 | $result[] = $scope->getScopeName(); |
33 | 33 | $scope = $scope->getParentScope(); |
34 | - } while ($scope !== null); |
|
34 | + }while ($scope !== null); |
|
35 | 35 | |
36 | 36 | return $result; |
37 | 37 | } |
@@ -41,13 +41,13 @@ discard block |
||
41 | 41 | */ |
42 | 42 | public static function getAccessor(?ContainerInterface $container = null): Accessor |
43 | 43 | { |
44 | - if ($container !== null && !$container instanceof Container) { |
|
45 | - throw new \InvalidArgumentException('Container must be an instance of ' . Container::class); |
|
44 | + if ($container !== null && !$container instanceof Container){ |
|
45 | + throw new \InvalidArgumentException('Container must be an instance of '.Container::class); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | $container ??= ContainerScope::getContainer(); |
49 | 49 | |
50 | - if (!$container instanceof Container) { |
|
50 | + if (!$container instanceof Container){ |
|
51 | 51 | throw new \RuntimeException('Container is not available.'); |
52 | 52 | } |
53 | 53 |
@@ -28,7 +28,8 @@ discard block |
||
28 | 28 | { |
29 | 29 | $scope = self::getAccessor($container)->scope; |
30 | 30 | $result = []; |
31 | - do { |
|
31 | + do |
|
32 | + { |
|
32 | 33 | $result[] = $scope->getScopeName(); |
33 | 34 | $scope = $scope->getParentScope(); |
34 | 35 | } while ($scope !== null); |
@@ -41,13 +42,15 @@ discard block |
||
41 | 42 | */ |
42 | 43 | public static function getAccessor(?ContainerInterface $container = null): Accessor |
43 | 44 | { |
44 | - if ($container !== null && !$container instanceof Container) { |
|
45 | + if ($container !== null && !$container instanceof Container) |
|
46 | + { |
|
45 | 47 | throw new \InvalidArgumentException('Container must be an instance of ' . Container::class); |
46 | 48 | } |
47 | 49 | |
48 | 50 | $container ??= ContainerScope::getContainer(); |
49 | 51 | |
50 | - if (!$container instanceof Container) { |
|
52 | + if (!$container instanceof Container) |
|
53 | + { |
|
51 | 54 | throw new \RuntimeException('Container is not available.'); |
52 | 55 | } |
53 | 56 |
@@ -31,7 +31,7 @@ |
||
31 | 31 | { |
32 | 32 | public function __construct( |
33 | 33 | public PublicContainer $publicContainer, |
34 | - ) { |
|
34 | + ){ |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | public function __get(string $name): object |