Completed
Pull Request — master (#1)
by Dorian
02:14
created

Skippable::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
c 0
b 0
f 0
rs 9.4285
cc 2
eloc 5
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