IdeHelperModule   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 1
A publish() 0 7 1
1
<?php
2
/**
3
 * Spiral Framework, IDE Helper
4
 *
5
 * @author    Dmitry Mironov <[email protected]>
6
 * @licence   MIT
7
 */
8
9
namespace Spiral;
10
11
use Spiral\Core\DirectoriesInterface;
12
use Spiral\IdeHelper\IdeHelperConfig;
13
use Spiral\Modules\ModuleInterface;
14
use Spiral\Modules\PublisherInterface;
15
use Spiral\Modules\RegistratorInterface;
16
17
/**
18
 * Class IdeHelperModule
19
 *
20
 * @package Spiral\IdeHelper
21
 */
22
class IdeHelperModule implements ModuleInterface
23
{
24
    /**
25
     * @inheritdoc
26
     */
27
    public function register(RegistratorInterface $registrator)
28
    {
29
        $registrator->configure('tokenizer', 'directories', 'spiral/idehelper', [
30
            "directory('libraries') . 'spiral/ide-helper/source/',",
31
        ]);
32
    }
33
34
    /**
35
     * @inheritdoc
36
     */
37
    public function publish(PublisherInterface $publisher, DirectoriesInterface $directories)
38
    {
39
        $publisher->publish(
40
            __DIR__ . '/../resources/config.php',
41
            $directories->directory('config') . IdeHelperConfig::CONFIG . '.php'
42
        );
43
    }
44
}
45