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

Setup::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 7
cts 7
cp 1
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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