Completed
Pull Request — master (#42)
by Frederik
04:41
created

CloseCommand::getTag()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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