Passed
Push — refactor/backendModule-ValueOb... ( ab393e...9011ea )
by Tomas Norre
16:36
created

CrawlAction::getCrawlActionLabel()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1.037

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 3
cp 0.6667
crap 1.037
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AOE\Crawler\Value;
6
7
use Assert\Assert;
8
9
final class CrawlAction
10
{
11
    /**
12
     * @var string
13
     */
14
    private $crawlAction;
15
16
    public function __construct(string $crawlAction)
17
    {
18
        Assert::that($crawlAction)
19
            ->inArray(['start', 'log', 'multiprocess']);
20
21 3
        $this->crawlAction = $crawlAction;
22
    }
23 3
24 3
    public function __toString(): string
25
    {
26 2
        return $this->crawlAction;
27 2
    }
28
}
29