GetDir::getFilePosition()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
crap 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