Test Failed
Push — develop ( f585b7...c7796c )
by Oguzhan
02:31
created

BaseCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 19
ccs 0
cts 0
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A initializeService() 0 6 1
A setMusicInfo() 0 5 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: oguzu
5
 * Date: 27-3-2017
6
 * Time: 16:52
7
 */
8
9
namespace Pbxg33k\MusicInfo\Command;
10
11
12
use Pbxg33k\MusicInfo\MusicInfo;
13
use Symfony\Component\Yaml\Yaml;
14
use Pbxg33k\InfoBase\Command\BaseCommand as InfoBaseCommand;
15
16
abstract class BaseCommand extends InfoBaseCommand
17
{
18
    protected function initializeService()
19
    {
20
        $config = Yaml::parse(file_get_contents(__DIR__ . '/../Resources/config/config.yml'));
21
22
        $this->infoService = new MusicInfo($config['music_info']);
23
    }
24
25
    /**
26
     * @param MusicInfo $musicInfo
27
     * @return BaseCommand
28
     */
29
    public function setMusicInfo($musicInfo)
30
    {
31
        $this->infoService = $musicInfo;
32
        return $this;
33
    }
34
}
35