Completed
Pull Request — master (#42)
by Frederik
02:26
created

StartTlsCommand::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 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
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
final class StartTlsCommand extends AbstractCommand
11
{
12
    /**
13
     * @var Tag
14
     */
15
    private $tag;
16
17
    /**
18
     * StartTlsCommand constructor.
19
     * @param Tag $tag
20
     */
21 2
    public function __construct(Tag $tag)
22
    {
23 2
        $this->tag = $tag;
24 2
    }
25
26
    /**
27
     * @return StreamInterface
28
     */
29 2
    public function createStream(): StreamInterface
30
    {
31 2
        return new StringStream('STARTTLS');
32
    }
33
34
    /**
35
     * @return Tag
36
     */
37 2
    public function getTag(): Tag
38
    {
39 2
        return $this->tag;
40
    }
41
}