Completed
Push — master ( bcac64...9b6ee4 )
by Nassif
11:39
created

Setup   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 4
dl 0
loc 29
ccs 0
cts 12
cp 0
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
    public function __construct(TranslationsSheet $translationsSheet, MetaSheet $metaSheet)
20
    {
21
        $this->translationsSheet = $translationsSheet;
22
        $this->metaSheet = $metaSheet;
23
24
        $this->nullOutput();
25
    }
26
27
    public function run()
28
    {
29
        $this->output->writeln('<comment>Setting up Translations sheet</comment>');
30
        $this->translationsSheet->setup();
31
32
        $this->output->writeln('<comment>Adding Meta sheet</comment>');
33
        $this->metaSheet->setup();
34
35
        $this->output->writeln('<info>Done. Spreasheet is ready.</info>');
36
    }
37
}
38