FilesystemBlock   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
cbo 2
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A assemble() 0 12 1
1
<?php
2
3
/**
4
 * This file is part of Bldr.io
5
 *
6
 * (c) Aaron Scherer <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE
10
 */
11
12
namespace Bldr\Block\Filesystem;
13
14
use Bldr\DependencyInjection\AbstractBlock;
15
use Symfony\Component\DependencyInjection\ContainerBuilder;
16
17
/**
18
 * @author Aaron Scherer <[email protected]>
19
 */
20
class FilesystemBlock extends AbstractBlock
21
{
22
    /**
23
     * {@inheritDoc}
24
     */
25
    public function assemble(array $config, ContainerBuilder $container)
26
    {
27
        $this->addService('bldr_filesystem.abstract', 'Bldr\Block\Filesystem\Task\FilesystemTask')
28
            ->setAbstract(true)
29
        ;
30
31
        $namespace = 'Bldr\Block\Filesystem\Task\\';
32
        $this->addDecoratedTask('bldr_filesystem.remove', $namespace.'RemoveTask', 'bldr_filesystem.abstract');
33
        $this->addDecoratedTask('bldr_filesystem.mkdir', $namespace.'MkdirTask', 'bldr_filesystem.abstract');
34
        $this->addDecoratedTask('bldr_filesystem.touch', $namespace.'TouchTask', 'bldr_filesystem.abstract');
35
        $this->addDecoratedTask('bldr_filesystem.dump', $namespace.'DumpTask', 'bldr_filesystem.abstract');
36
    }
37
}
38