StatisticsModule   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 16 1
A publish() 0 3 1
1
<?php
2
3
namespace Spiral;
4
5
use Spiral\Core\DirectoriesInterface;
6
use Spiral\Modules\ModuleInterface;
7
use Spiral\Modules\PublisherInterface;
8
use Spiral\Modules\RegistratorInterface;
9
10
/**
11
 * Spiral Framework.
12
 *
13
 * @license   MIT
14
 * @author    Valentin V (vvval)
15
 */
16
class StatisticsModule implements ModuleInterface
17
{
18
    /**
19
     * @param RegistratorInterface $registrator
20
     */
21
    public function register(RegistratorInterface $registrator)
22
    {
23
        //Register tokenizer directory
24
        $registrator->configure('tokenizer', 'directories', 'spiral/statistics', [
25
            "directory('libraries') . 'spiral/statistics/source/Statistics/',",
26
        ]);
27
28
        //Register database settings
29
        $registrator->configure('databases', 'databases', 'spiral/statistics', [
30
            "'statistics' => [",
31
            "   'connection'  => 'mysql',",
32
            "   'tablePrefix' => 'statistics_'",
33
            "   /*{{databases.statistics}}*/",
34
            "],",
35
        ]);
36
    }
37
38
    /**
39
     * @param PublisherInterface   $publisher
40
     * @param DirectoriesInterface $directories
41
     */
42
    public function publish(PublisherInterface $publisher, DirectoriesInterface $directories)
43
    {
44
    }
45
}