GetDir   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 30
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setPosition() 0 4 1
A getCommand() 0 3 1
A getData() 0 3 1
A getFilePosition() 0 3 1
A setDirPath() 0 4 1
1
<?php
2
3
namespace kalanis\RemoteRequest\Protocols\Fsp\Query;
4
5
6
use kalanis\RemoteRequest\Protocols\Fsp;
7
8
9
/**
10
 * Class GetDir
11
 * @package kalanis\RemoteRequest\Protocols\Fsp\Query
12
 * Want directory listing
13
 */
14
class GetDir extends AQuery
15
{
16
    protected string $dirPath = '';
17
    protected int $position = 0;
18
19 1
    protected function getCommand(): int
20
    {
21 1
        return Fsp::CC_GET_DIR;
22
    }
23
24 1
    public function setDirPath(string $dirPath): self
25
    {
26 1
        $this->dirPath = $dirPath;
27 1
        return $this;
28
    }
29
30 1
    public function setPosition(int $position): self
31
    {
32 1
        $this->position = $position;
33 1
        return $this;
34
    }
35
36 1
    protected function getFilePosition(): int
37
    {
38 1
        return $this->position;
39
    }
40
41 1
    protected function getData(): string
42
    {
43 1
        return $this->dirPath . chr(0);
44
    }
45
}
46