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

DryRunner   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 22
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A skip() 0 10 2
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