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

Setup::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 2
crap 2
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