Completed
Pull Request — master (#42)
by Frederik
01:52
created

NoopCommand::getTag()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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
/**
11
 * Class NoopCommand
12
 * @package Genkgo\Mail\Protocol\Imap\Request
13
 */
14
final class NoopCommand extends AbstractCommand
15
{
16
    /**
17
     * @var Tag
18
     */
19
    private $tag;
20
21
    /**
22
     * NoopCommand constructor.
23
     * @param Tag $tag
24
     */
25 2
    public function __construct(Tag $tag)
26
    {
27 2
        $this->tag = $tag;
28 2
    }
29
30
    /**
31
     * @return StreamInterface
32
     */
33 2
    protected function createStream(): StreamInterface
34
    {
35 2
        return new StringStream('NOOP');
36
    }
37
38
    /**
39
     * @return Tag
40
     */
41 2
    public function getTag(): Tag
42
    {
43 2
        return $this->tag;
44
    }
45
}