@@ -57,14 +57,14 @@ discard block |
||
57 | 57 | $this->checkClass($info[static::ADAPTER_KEY], \sprintf('Filesystem %s adapter', $this->name)); |
58 | 58 | $this->adapter = $info[static::ADAPTER_KEY]; |
59 | 59 | |
60 | - if (array_key_exists(static::RESOLVER_KEY, $info)) { |
|
60 | + if (array_key_exists(static::RESOLVER_KEY, $info)){ |
|
61 | 61 | $this->checkClass($info[static::RESOLVER_KEY], \sprintf('Filesystem %s resolver', $this->name)); |
62 | 62 | $this->resolver = $info[static::RESOLVER_KEY]; |
63 | 63 | } |
64 | 64 | |
65 | 65 | $this->prepareOptions($info[OptionsBasedInterface::OPTIONS_KEY]); |
66 | 66 | |
67 | - if ($this instanceof SpecificConfigurableFileSystemInfo) { |
|
67 | + if ($this instanceof SpecificConfigurableFileSystemInfo){ |
|
68 | 68 | $this->constructSpecific($info); |
69 | 69 | } |
70 | 70 | } |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public function isAdvancedUsage(): bool |
100 | 100 | { |
101 | - foreach (static::ADDITIONAL_OPTIONS as $optionalOption => $type) { |
|
102 | - if ($this->hasOption($optionalOption)) { |
|
101 | + foreach (static::ADDITIONAL_OPTIONS as $optionalOption => $type){ |
|
102 | + if ($this->hasOption($optionalOption)){ |
|
103 | 103 | return true; |
104 | 104 | } |
105 | 105 | } |
@@ -122,8 +122,8 @@ discard block |
||
122 | 122 | \sprintf(' for filesystem `%s`', $this->getName()) |
123 | 123 | ); |
124 | 124 | |
125 | - foreach ($options as $optionKey => $option) { |
|
126 | - if (($type = $this->getOptionType($optionKey)) === null) { |
|
125 | + foreach ($options as $optionKey => $option){ |
|
126 | + if (($type = $this->getOptionType($optionKey)) === null){ |
|
127 | 127 | continue; |
128 | 128 | } |
129 | 129 | |
@@ -143,13 +143,13 @@ discard block |
||
143 | 143 | */ |
144 | 144 | protected function validateInfoSufficient(string $fs, array $info): void |
145 | 145 | { |
146 | - if (!array_key_exists(static::ADAPTER_KEY, $info)) { |
|
146 | + if (!array_key_exists(static::ADAPTER_KEY, $info)){ |
|
147 | 147 | throw new ConfigException( |
148 | 148 | \sprintf('Filesystem `%s` needs adapter class defined', $fs) |
149 | 149 | ); |
150 | 150 | } |
151 | 151 | |
152 | - if (!array_key_exists(OptionsBasedInterface::OPTIONS_KEY, $info)) { |
|
152 | + if (!array_key_exists(OptionsBasedInterface::OPTIONS_KEY, $info)){ |
|
153 | 153 | throw new ConfigException( |
154 | 154 | \sprintf('Filesystem `%s` needs options defined', $fs) |
155 | 155 | ); |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | */ |
168 | 168 | protected function validateOptionByType(string $optionLabel, string $optionType, $optionVal): void |
169 | 169 | { |
170 | - if (!$this->isOptionHasRequiredType($optionLabel, $optionVal, $optionType)) { |
|
170 | + if (!$this->isOptionHasRequiredType($optionLabel, $optionVal, $optionType)){ |
|
171 | 171 | throw new ConfigException( |
172 | 172 | \sprintf( |
173 | 173 | 'Option `%s` defined in wrong format for filesystem `%s`, %s expected', |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | */ |
189 | 189 | protected function getOptionType(string $option): ?string |
190 | 190 | { |
191 | - if (array_key_exists($option, static::REQUIRED_OPTIONS)) { |
|
191 | + if (array_key_exists($option, static::REQUIRED_OPTIONS)){ |
|
192 | 192 | return static::REQUIRED_OPTIONS[$option]; |
193 | 193 | } |
194 | 194 |
@@ -57,14 +57,16 @@ discard block |
||
57 | 57 | $this->checkClass($info[static::ADAPTER_KEY], \sprintf('Filesystem %s adapter', $this->name)); |
58 | 58 | $this->adapter = $info[static::ADAPTER_KEY]; |
59 | 59 | |
60 | - if (array_key_exists(static::RESOLVER_KEY, $info)) { |
|
60 | + if (array_key_exists(static::RESOLVER_KEY, $info)) |
|
61 | + { |
|
61 | 62 | $this->checkClass($info[static::RESOLVER_KEY], \sprintf('Filesystem %s resolver', $this->name)); |
62 | 63 | $this->resolver = $info[static::RESOLVER_KEY]; |
63 | 64 | } |
64 | 65 | |
65 | 66 | $this->prepareOptions($info[OptionsBasedInterface::OPTIONS_KEY]); |
66 | 67 | |
67 | - if ($this instanceof SpecificConfigurableFileSystemInfo) { |
|
68 | + if ($this instanceof SpecificConfigurableFileSystemInfo) |
|
69 | + { |
|
68 | 70 | $this->constructSpecific($info); |
69 | 71 | } |
70 | 72 | } |
@@ -98,8 +100,10 @@ discard block |
||
98 | 100 | */ |
99 | 101 | public function isAdvancedUsage(): bool |
100 | 102 | { |
101 | - foreach (static::ADDITIONAL_OPTIONS as $optionalOption => $type) { |
|
102 | - if ($this->hasOption($optionalOption)) { |
|
103 | + foreach (static::ADDITIONAL_OPTIONS as $optionalOption => $type) |
|
104 | + { |
|
105 | + if ($this->hasOption($optionalOption)) |
|
106 | + { |
|
103 | 107 | return true; |
104 | 108 | } |
105 | 109 | } |
@@ -122,8 +126,10 @@ discard block |
||
122 | 126 | \sprintf(' for filesystem `%s`', $this->getName()) |
123 | 127 | ); |
124 | 128 | |
125 | - foreach ($options as $optionKey => $option) { |
|
126 | - if (($type = $this->getOptionType($optionKey)) === null) { |
|
129 | + foreach ($options as $optionKey => $option) |
|
130 | + { |
|
131 | + if (($type = $this->getOptionType($optionKey)) === null) |
|
132 | + { |
|
127 | 133 | continue; |
128 | 134 | } |
129 | 135 | |
@@ -143,13 +149,15 @@ discard block |
||
143 | 149 | */ |
144 | 150 | protected function validateInfoSufficient(string $fs, array $info): void |
145 | 151 | { |
146 | - if (!array_key_exists(static::ADAPTER_KEY, $info)) { |
|
152 | + if (!array_key_exists(static::ADAPTER_KEY, $info)) |
|
153 | + { |
|
147 | 154 | throw new ConfigException( |
148 | 155 | \sprintf('Filesystem `%s` needs adapter class defined', $fs) |
149 | 156 | ); |
150 | 157 | } |
151 | 158 | |
152 | - if (!array_key_exists(OptionsBasedInterface::OPTIONS_KEY, $info)) { |
|
159 | + if (!array_key_exists(OptionsBasedInterface::OPTIONS_KEY, $info)) |
|
160 | + { |
|
153 | 161 | throw new ConfigException( |
154 | 162 | \sprintf('Filesystem `%s` needs options defined', $fs) |
155 | 163 | ); |
@@ -167,7 +175,8 @@ discard block |
||
167 | 175 | */ |
168 | 176 | protected function validateOptionByType(string $optionLabel, string $optionType, $optionVal): void |
169 | 177 | { |
170 | - if (!$this->isOptionHasRequiredType($optionLabel, $optionVal, $optionType)) { |
|
178 | + if (!$this->isOptionHasRequiredType($optionLabel, $optionVal, $optionType)) |
|
179 | + { |
|
171 | 180 | throw new ConfigException( |
172 | 181 | \sprintf( |
173 | 182 | 'Option `%s` defined in wrong format for filesystem `%s`, %s expected', |
@@ -188,7 +197,8 @@ discard block |
||
188 | 197 | */ |
189 | 198 | protected function getOptionType(string $option): ?string |
190 | 199 | { |
191 | - if (array_key_exists($option, static::REQUIRED_OPTIONS)) { |
|
200 | + if (array_key_exists($option, static::REQUIRED_OPTIONS)) |
|
201 | + { |
|
192 | 202 | return static::REQUIRED_OPTIONS[$option]; |
193 | 203 | } |
194 | 204 |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | $fsInfo = $config->buildFileSystemInfo($fs); |
54 | 54 | |
55 | - if (empty($requiredClass) || !$fsInfo instanceof $requiredClass) { |
|
55 | + if (empty($requiredClass) || !$fsInfo instanceof $requiredClass){ |
|
56 | 56 | throw new StorageException( |
57 | 57 | \sprintf( |
58 | 58 | 'Wrong filesystem info (`%s`) for resolver `%s`', |
@@ -78,11 +78,11 @@ discard block |
||
78 | 78 | */ |
79 | 79 | public function normalizeFilePath(string $filePath): string |
80 | 80 | { |
81 | - try { |
|
81 | + try{ |
|
82 | 82 | $uri = $this->uriParser->parse($filePath); |
83 | 83 | |
84 | 84 | return $uri->getPath(); |
85 | - } catch (UriException $e) { |
|
85 | + }catch (UriException $e){ |
|
86 | 86 | // if filePath is not uri we suppose it is short form of filepath - without fs part |
87 | 87 | } |
88 | 88 |
@@ -52,7 +52,8 @@ discard block |
||
52 | 52 | |
53 | 53 | $fsInfo = $config->buildFileSystemInfo($fs); |
54 | 54 | |
55 | - if (empty($requiredClass) || !$fsInfo instanceof $requiredClass) { |
|
55 | + if (empty($requiredClass) || !$fsInfo instanceof $requiredClass) |
|
56 | + { |
|
56 | 57 | throw new StorageException( |
57 | 58 | \sprintf( |
58 | 59 | 'Wrong filesystem info (`%s`) for resolver `%s`', |
@@ -78,11 +79,14 @@ discard block |
||
78 | 79 | */ |
79 | 80 | public function normalizeFilePath(string $filePath): string |
80 | 81 | { |
81 | - try { |
|
82 | + try |
|
83 | + { |
|
82 | 84 | $uri = $this->uriParser->parse($filePath); |
83 | 85 | |
84 | 86 | return $uri->getPath(); |
85 | - } catch (UriException $e) { |
|
87 | + } |
|
88 | + catch (UriException $e) |
|
89 | + { |
|
86 | 90 | // if filePath is not uri we suppose it is short form of filepath - without fs part |
87 | 91 | } |
88 | 92 |
@@ -34,7 +34,7 @@ |
||
34 | 34 | */ |
35 | 35 | public function buildUrl(string $uri, array $options = []) |
36 | 36 | { |
37 | - if (!$this->fsInfo->hasOption(LocalInfo::HOST_KEY)) { |
|
37 | + if (!$this->fsInfo->hasOption(LocalInfo::HOST_KEY)){ |
|
38 | 38 | throw new ResolveException( |
39 | 39 | \sprintf('Url can\'t be built for filesystem `%s` - host was not defined', $this->fsInfo->getName()) |
40 | 40 | ); |
@@ -34,7 +34,8 @@ |
||
34 | 34 | */ |
35 | 35 | public function buildUrl(string $uri, array $options = []) |
36 | 36 | { |
37 | - if (!$this->fsInfo->hasOption(LocalInfo::HOST_KEY)) { |
|
37 | + if (!$this->fsInfo->hasOption(LocalInfo::HOST_KEY)) |
|
38 | + { |
|
38 | 39 | throw new ResolveException( |
39 | 40 | \sprintf('Url can\'t be built for filesystem `%s` - host was not defined', $this->fsInfo->getName()) |
40 | 41 | ); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * @var string |
21 | 21 | */ |
22 | 22 | private const ERROR_INVALID_URI_TYPE = |
23 | - 'URI argument must be a string-like ' . |
|
23 | + 'URI argument must be a string-like '. |
|
24 | 24 | 'or instance of one of [%s], but %s passed' |
25 | 25 | ; |
26 | 26 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | */ |
30 | 30 | public function parse($uri): UriInterface |
31 | 31 | { |
32 | - switch (true) { |
|
32 | + switch (true){ |
|
33 | 33 | case $uri instanceof UriInterface: |
34 | 34 | return $uri; |
35 | 35 |
@@ -29,7 +29,8 @@ |
||
29 | 29 | */ |
30 | 30 | public function parse($uri): UriInterface |
31 | 31 | { |
32 | - switch (true) { |
|
32 | + switch (true) |
|
33 | + { |
|
33 | 34 | case $uri instanceof UriInterface: |
34 | 35 | return $uri; |
35 | 36 |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function __toString(): string |
53 | 53 | { |
54 | - return $this->getFileSystem() . self::SCHEME_PATH_DELIMITER . $this->getPath(); |
|
54 | + return $this->getFileSystem().self::SCHEME_PATH_DELIMITER.$this->getPath(); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | */ |
110 | 110 | private function setFileSystem(string $fs): void |
111 | 111 | { |
112 | - if ($fs === '') { |
|
112 | + if ($fs === ''){ |
|
113 | 113 | throw new UriException('Filesystem name can not be empty'); |
114 | 114 | } |
115 | 115 | |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $path = \str_replace(['\\', '/'], self::PATH_DELIMITER, $path); |
126 | 126 | $path = \trim(\trim($path), self::PATH_DELIMITER); |
127 | 127 | |
128 | - if ($path === '') { |
|
128 | + if ($path === ''){ |
|
129 | 129 | throw new UriException('Filesystem pathname can not be empty'); |
130 | 130 | } |
131 | 131 |
@@ -109,7 +109,8 @@ discard block |
||
109 | 109 | */ |
110 | 110 | private function setFileSystem(string $fs): void |
111 | 111 | { |
112 | - if ($fs === '') { |
|
112 | + if ($fs === '') |
|
113 | + { |
|
113 | 114 | throw new UriException('Filesystem name can not be empty'); |
114 | 115 | } |
115 | 116 | |
@@ -125,7 +126,8 @@ discard block |
||
125 | 126 | $path = \str_replace(['\\', '/'], self::PATH_DELIMITER, $path); |
126 | 127 | $path = \trim(\trim($path), self::PATH_DELIMITER); |
127 | 128 | |
128 | - if ($path === '') { |
|
129 | + if ($path === '') |
|
130 | + { |
|
129 | 131 | throw new UriException('Filesystem pathname can not be empty'); |
130 | 132 | } |
131 | 133 |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function resolveAll(iterable $uris): iterable |
58 | 58 | { |
59 | - foreach ($uris as $uri) { |
|
59 | + foreach ($uris as $uri){ |
|
60 | 60 | yield $this->resolve($uri); |
61 | 61 | } |
62 | 62 | } |
@@ -66,15 +66,15 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function resolve($uri) |
68 | 68 | { |
69 | - try { |
|
69 | + try{ |
|
70 | 70 | $uri = $this->parser->parse($uri); |
71 | 71 | |
72 | 72 | return $this->getResolver($uri->getFileSystem()) |
73 | 73 | ->buildUrl($uri->getPath()) |
74 | 74 | ; |
75 | - } catch (StorageException $e) { |
|
75 | + }catch (StorageException $e){ |
|
76 | 76 | throw $e; |
77 | - } catch (\Throwable $e) { |
|
77 | + }catch (\Throwable $e){ |
|
78 | 78 | throw new ResolveException($e->getMessage(), (int)$e->getCode(), $e); |
79 | 79 | } |
80 | 80 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | protected function getResolver(string $fileSystem): AdapterResolverInterface |
92 | 92 | { |
93 | - if (!\array_key_exists($fileSystem, $this->resolvers)) { |
|
93 | + if (!\array_key_exists($fileSystem, $this->resolvers)){ |
|
94 | 94 | $this->resolvers[$fileSystem] = $this->prepareResolverForFileSystem( |
95 | 95 | $this->config->buildFileSystemInfo($fileSystem) |
96 | 96 | ); |
@@ -56,7 +56,8 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function resolveAll(iterable $uris): iterable |
58 | 58 | { |
59 | - foreach ($uris as $uri) { |
|
59 | + foreach ($uris as $uri) |
|
60 | + { |
|
60 | 61 | yield $this->resolve($uri); |
61 | 62 | } |
62 | 63 | } |
@@ -66,15 +67,20 @@ discard block |
||
66 | 67 | */ |
67 | 68 | public function resolve($uri) |
68 | 69 | { |
69 | - try { |
|
70 | + try |
|
71 | + { |
|
70 | 72 | $uri = $this->parser->parse($uri); |
71 | 73 | |
72 | 74 | return $this->getResolver($uri->getFileSystem()) |
73 | 75 | ->buildUrl($uri->getPath()) |
74 | 76 | ; |
75 | - } catch (StorageException $e) { |
|
77 | + } |
|
78 | + catch (StorageException $e) |
|
79 | + { |
|
76 | 80 | throw $e; |
77 | - } catch (\Throwable $e) { |
|
81 | + } |
|
82 | + catch (\Throwable $e) |
|
83 | + { |
|
78 | 84 | throw new ResolveException($e->getMessage(), (int)$e->getCode(), $e); |
79 | 85 | } |
80 | 86 | } |
@@ -90,7 +96,8 @@ discard block |
||
90 | 96 | */ |
91 | 97 | protected function getResolver(string $fileSystem): AdapterResolverInterface |
92 | 98 | { |
93 | - if (!\array_key_exists($fileSystem, $this->resolvers)) { |
|
99 | + if (!\array_key_exists($fileSystem, $this->resolvers)) |
|
100 | + { |
|
94 | 101 | $this->resolvers[$fileSystem] = $this->prepareResolverForFileSystem( |
95 | 102 | $this->config->buildFileSystemInfo($fileSystem) |
96 | 103 | ); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | { |
32 | 32 | $builder = static::detectAdapterBuilder($info); |
33 | 33 | |
34 | - if ($info->isAdvancedUsage()) { |
|
34 | + if ($info->isAdvancedUsage()){ |
|
35 | 35 | return $builder->buildAdvanced(); |
36 | 36 | } |
37 | 37 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | private static function detectAdapterBuilder( |
51 | 51 | FileSystemInfo\FileSystemInfoInterface $info |
52 | 52 | ): AdapterBuilder\AdapterBuilderInterface { |
53 | - switch (get_class($info)) { |
|
53 | + switch (get_class($info)){ |
|
54 | 54 | case FileSystemInfo\LocalInfo::class: |
55 | 55 | return new AdapterBuilder\LocalBuilder($info); |
56 | 56 | case FileSystemInfo\Aws\AwsS3Info::class: |
@@ -31,7 +31,8 @@ discard block |
||
31 | 31 | { |
32 | 32 | $builder = static::detectAdapterBuilder($info); |
33 | 33 | |
34 | - if ($info->isAdvancedUsage()) { |
|
34 | + if ($info->isAdvancedUsage()) |
|
35 | + { |
|
35 | 36 | return $builder->buildAdvanced(); |
36 | 37 | } |
37 | 38 | |
@@ -50,7 +51,8 @@ discard block |
||
50 | 51 | private static function detectAdapterBuilder( |
51 | 52 | FileSystemInfo\FileSystemInfoInterface $info |
52 | 53 | ): AdapterBuilder\AdapterBuilderInterface { |
53 | - switch (get_class($info)) { |
|
54 | + switch (get_class($info)) |
|
55 | + { |
|
54 | 56 | case FileSystemInfo\LocalInfo::class: |
55 | 57 | return new AdapterBuilder\LocalBuilder($info); |
56 | 58 | case FileSystemInfo\Aws\AwsS3Info::class: |
@@ -35,7 +35,7 @@ |
||
35 | 35 | { |
36 | 36 | $requiredClass = static::FILE_SYSTEM_INFO_CLASS; |
37 | 37 | |
38 | - if (empty($requiredClass) || !$fsInfo instanceof $requiredClass) { |
|
38 | + if (empty($requiredClass) || !$fsInfo instanceof $requiredClass){ |
|
39 | 39 | throw new StorageException( |
40 | 40 | \sprintf('Wrong filesystem info `%s` provided for `%s`', get_class($fsInfo), static::class) |
41 | 41 | ); |
@@ -35,7 +35,8 @@ |
||
35 | 35 | { |
36 | 36 | $requiredClass = static::FILE_SYSTEM_INFO_CLASS; |
37 | 37 | |
38 | - if (empty($requiredClass) || !$fsInfo instanceof $requiredClass) { |
|
38 | + if (empty($requiredClass) || !$fsInfo instanceof $requiredClass) |
|
39 | + { |
|
39 | 40 | throw new StorageException( |
40 | 41 | \sprintf('Wrong filesystem info `%s` provided for `%s`', get_class($fsInfo), static::class) |
41 | 42 | ); |
@@ -40,12 +40,12 @@ discard block |
||
40 | 40 | $app->bindInjector(StorageConfig::class, ConfiguratorInterface::class); |
41 | 41 | |
42 | 42 | $app->bindSingleton(UriResolverInterface::class, $this->uriResolverRegistrar()); |
43 | - $app->bindSingleton(UriResolver::class, static function (UriResolverInterface $resolver) { |
|
43 | + $app->bindSingleton(UriResolver::class, static function (UriResolverInterface $resolver){ |
|
44 | 44 | return $resolver; |
45 | 45 | }); |
46 | 46 | |
47 | 47 | $app->bindSingleton(StorageInterface::class, $this->storageRegistrar()); |
48 | - $app->bindSingleton(Storage::class, static function (StorageInterface $storage) { |
|
48 | + $app->bindSingleton(Storage::class, static function (StorageInterface $storage){ |
|
49 | 49 | return $storage; |
50 | 50 | }); |
51 | 51 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | private function storageRegistrar(): \Closure |
57 | 57 | { |
58 | - return static function (StorageConfig $config, UriParserInterface $parser) { |
|
58 | + return static function (StorageConfig $config, UriParserInterface $parser){ |
|
59 | 59 | return new Storage($config, $parser); |
60 | 60 | }; |
61 | 61 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | private function uriResolverRegistrar(): \Closure |
67 | 67 | { |
68 | - return static function (StorageConfig $config, UriParserInterface $parser) { |
|
68 | + return static function (StorageConfig $config, UriParserInterface $parser){ |
|
69 | 69 | return new UriResolver($config, $parser); |
70 | 70 | }; |
71 | 71 | } |
@@ -40,12 +40,14 @@ discard block |
||
40 | 40 | $app->bindInjector(StorageConfig::class, ConfiguratorInterface::class); |
41 | 41 | |
42 | 42 | $app->bindSingleton(UriResolverInterface::class, $this->uriResolverRegistrar()); |
43 | - $app->bindSingleton(UriResolver::class, static function (UriResolverInterface $resolver) { |
|
43 | + $app->bindSingleton(UriResolver::class, static function (UriResolverInterface $resolver) |
|
44 | + { |
|
44 | 45 | return $resolver; |
45 | 46 | }); |
46 | 47 | |
47 | 48 | $app->bindSingleton(StorageInterface::class, $this->storageRegistrar()); |
48 | - $app->bindSingleton(Storage::class, static function (StorageInterface $storage) { |
|
49 | + $app->bindSingleton(Storage::class, static function (StorageInterface $storage) |
|
50 | + { |
|
49 | 51 | return $storage; |
50 | 52 | }); |
51 | 53 | } |
@@ -55,7 +57,8 @@ discard block |
||
55 | 57 | */ |
56 | 58 | private function storageRegistrar(): \Closure |
57 | 59 | { |
58 | - return static function (StorageConfig $config, UriParserInterface $parser) { |
|
60 | + return static function (StorageConfig $config, UriParserInterface $parser) |
|
61 | + { |
|
59 | 62 | return new Storage($config, $parser); |
60 | 63 | }; |
61 | 64 | } |
@@ -65,7 +68,8 @@ discard block |
||
65 | 68 | */ |
66 | 69 | private function uriResolverRegistrar(): \Closure |
67 | 70 | { |
68 | - return static function (StorageConfig $config, UriParserInterface $parser) { |
|
71 | + return static function (StorageConfig $config, UriParserInterface $parser) |
|
72 | + { |
|
69 | 73 | return new UriResolver($config, $parser); |
70 | 74 | }; |
71 | 75 | } |