Passed
Pull Request — master (#662)
by Maxim
08:13
created

Queueable   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 8
ccs 2
cts 2
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Queue\Attribute;
6
7
use Doctrine\Common\Annotations\Annotation\Attribute;
8
use Doctrine\Common\Annotations\Annotation\Attributes;
9
use Doctrine\Common\Annotations\Annotation\Target;
10
use Spiral\Attributes\NamedArgumentConstructor;
11
12
/**
13
 * @Annotation
14
 * @NamedArgumentConstructor
15
 * @Target({"CLASS"})
16
 * @Attributes({
17
 *     @Attribute("queue", type="string")
18
 * })
19
 */
20
#[\Attribute(\Attribute::TARGET_CLASS), NamedArgumentConstructor]
21
final class Queueable
22
{
23
    public ?string $queue = null;
24
25 5
    public function __construct(string $queue = null)
26
    {
27 5
        $this->queue = $queue;
28
    }
29
}
30