Passed
Pull Request — master (#65)
by Sergey
03:06
created

addFilesystemBuilderPluginCollection()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
/**
4
 * This file is part of the Spryker Commerce OS.
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace Pyz\Service\Flysystem;
9
10
use Spryker\Service\Flysystem\FlysystemDependencyProvider as SprykerFlysystemDependencyProvider;
11
use Spryker\Service\FlysystemFtpFileSystem\Plugin\Flysystem\FtpFilesystemBuilderPlugin;
12
use Spryker\Service\FlysystemLocalFileSystem\Plugin\Flysystem\LocalFilesystemBuilderPlugin;
13
use Spryker\Service\Kernel\Container;
14
15
class FlysystemDependencyProvider extends SprykerFlysystemDependencyProvider
16
{
17
    /**
18
     * @param \Spryker\Service\Kernel\Container $container
19
     *
20
     * @return \Spryker\Service\Kernel\Container
21
     */
22
    protected function addFilesystemBuilderPluginCollection($container): Container
23
    {
24
        $container->set(static::PLUGIN_COLLECTION_FILESYSTEM_BUILDER, function (Container $container) {
0 ignored issues
show
Unused Code introduced by
The parameter $container is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

24
        $container->set(static::PLUGIN_COLLECTION_FILESYSTEM_BUILDER, function (/** @scrutinizer ignore-unused */ Container $container) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
25
            return $this->getFilesystemBuilderPluginCollection();
26
        });
27
28
        return $container;
29
    }
30
31
    /**
32
     * @return array<\Spryker\Service\Flysystem\Dependency\Plugin\FlysystemFilesystemBuilderPluginInterface>
33
     */
34
    protected function getFilesystemBuilderPluginCollection(): array
35
    {
36
        return [
37
            new FtpFilesystemBuilderPlugin(),
38
            new LocalFilesystemBuilderPlugin(),
39
        ];
40
    }
41
}
42