CheckCommand::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Genkgo\Mail\Protocol\Imap\Request;
5
6
use Genkgo\Mail\Protocol\Imap\Tag;
7
use Genkgo\Mail\Stream\StringStream;
8
use Genkgo\Mail\StreamInterface;
9
10
final class CheckCommand extends AbstractCommand
11
{
12
    /**
13
     * @var Tag
14
     */
15
    private $tag;
16
17
    /**
18
     * @param Tag $tag
19
     */
20 1
    public function __construct(Tag $tag)
21
    {
22 1
        $this->tag = $tag;
23 1
    }
24
25
    /**
26
     * @return StreamInterface
27
     */
28 1
    protected function createStream(): StreamInterface
29
    {
30 1
        return new StringStream('CHECK');
31
    }
32
33
    /**
34
     * @return Tag
35
     */
36 1
    public function getTag(): Tag
37
    {
38 1
        return $this->tag;
39
    }
40
}
41