Completed
Push — master ( 738ba0...8b90c1 )
by Dorian
01:21
created

DryRunner::skip()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 5
nc 2
nop 0
1
<?php declare(strict_types=1);
2
3
namespace App\Platform\YouTube;
4
5
trait DryRunner
6
{
7
    /** @var \App\UI\UserInterface */
8
    private $ui;
9
10
    /** @var bool */
11
    private $dryRun;
12
13
    /**
14
     * @return bool
15
     */
16
    public function skip(): bool
17
    {
18
        if ($this->dryRun) {
19
            $this->ui->writeln('<info>[DRY-RUN]</info> Not doing anything...'.PHP_EOL);
20
21
            return true;
22
        }
23
24
        return false;
25
    }
26
}
27