Completed
Push — master ( 6d7cc4...076c48 )
by Dorian
10s
created

Skippable::skip()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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