CheckCommand   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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