QueueFilter::__toString()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

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 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AOE\Crawler\Value;
6
7
/*
8
 * (c) 2020 AOE GmbH <[email protected]>
9
 *
10
 * This file is part of the TYPO3 Crawler Extension.
11
 *
12
 * It is free software; you can redistribute it and/or modify it under
13
 * the terms of the GNU General Public License, either version 2
14
 * of the License, or any later version.
15
 *
16
 * For the full copyright and license information, please read the
17
 * LICENSE.txt file that was distributed with this source code.
18
 *
19
 * The TYPO3 project - inspiring people to share!
20
 */
21
22
use Assert\Assert;
23
24
/**
25
 * @internal since v9.2.5
26
 */
27
class QueueFilter
28
{
29
    /**
30
     * @var string
31
     */
32
    private $queueFilter;
33
34 8
    public function __construct(string $queueFilter = 'all')
35
    {
36 8
        Assert::that($queueFilter)
37 8
            ->inArray(['all', 'pending', 'finished']);
38
39 7
        $this->queueFilter = $queueFilter;
40 7
    }
41
42 18
    public function __toString()
43
    {
44 18
        return $this->queueFilter;
45
    }
46
}
47