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

CapabilityCommand   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 33
c 0
b 0
f 0
ccs 0
cts 12
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A createStream() 0 4 1
A getTag() 0 4 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 CapabilityCommand extends AbstractCommand
11
{
12
13
    /**
14
     * @var Tag
15
     */
16
    private $tag;
17
18
    /**
19
     * CapabilityCommand constructor.
20
     * @param Tag $tag
21
     */
22
    public function __construct(Tag $tag)
23
    {
24
        $this->tag = $tag;
25
    }
26
27
    /**
28
     * @return StreamInterface
29
     */
30
    public function createStream(): StreamInterface
31
    {
32
        return new StringStream('CAPABILITY');
33
    }
34
35
    /**
36
     * @return Tag
37
     */
38
    public function getTag(): Tag
39
    {
40
        return $this->tag;
41
    }
42
}