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

NoopCommand   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 32
ccs 7
cts 7
cp 1
rs 10
c 1
b 0
f 0

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
/**
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 1
    public function __construct(Tag $tag)
26
    {
27 1
        $this->tag = $tag;
28 1
    }
29
30
    /**
31
     * @return StreamInterface
32
     */
33 1
    protected function createStream(): StreamInterface
34
    {
35 1
        return new StringStream('NOOP');
36
    }
37
38
    /**
39
     * @return Tag
40
     */
41 1
    public function getTag(): Tag
42
    {
43 1
        return $this->tag;
44
    }
45
}