Completed
Push — master ( a624e1...736705 )
by Nassif
12:28
created

Setup   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 4
dl 0
loc 29
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A run() 0 10 1
1
<?php
2
3
namespace Nikaia\TranslationSheet;
4
5
use Nikaia\TranslationSheet\Commands\Output;
6
use Nikaia\TranslationSheet\Sheet\MetaSheet;
7
use Nikaia\TranslationSheet\Sheet\TranslationsSheet;
8
9
class Setup
10
{
11
    use Output;
12
13
    /** @var TranslationsSheet */
14
    protected $translationsSheet;
15
16
    /** @var MetaSheet */
17
    protected $metaSheet;
18
19 1
    public function __construct(TranslationsSheet $translationsSheet, MetaSheet $metaSheet)
20
    {
21 1
        $this->translationsSheet = $translationsSheet;
22 1
        $this->metaSheet = $metaSheet;
23
24 1
        $this->nullOutput();
25 1
    }
26
27 1
    public function run()
28
    {
29 1
        $this->output->writeln('<comment>Setting up Translations sheet</comment>');
30 1
        $this->translationsSheet->setup();
31
32 1
        $this->output->writeln('<comment>Adding Meta sheet</comment>');
33 1
        $this->metaSheet->setup();
34
35 1
        $this->output->writeln('<info>Done. Spreasheet is ready.</info>');
36 1
    }
37
}
38