Passed
Pull Request — master (#7)
by Shinji
09:59
created

FilesystemFlagsImplementationTrait   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 40
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setFlagUtimeOmitOk() 0 3 1
A getFlagNopath() 0 3 1
A getFlagNullpathOk() 0 3 1
A setFlagNopath() 0 3 1
A setFlagNullpathOk() 0 3 1
A getFlagUtimeOmitOk() 0 3 1
1
<?php
2
3
/**
4
 * This file is part of the sj-i/php-fuse package.
5
 *
6
 * (c) sji <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Fuse;
15
16
trait FilesystemFlagsImplementationTrait
17
{
18
    /**
19
     * unsigned int flag_nullpath_ok:1;
20
     * unsigned int flag_nopath:1;
21
     * unsigned int flag_utime_omit_ok:1;
22
     * unsigned int flag_reserved:29;
23
     */
24
    private bool $flag_nullpath_ok = false;
25
    private bool $flag_nopath = false;
26
    private bool $flag_utime_omit_ok = false;
27
28
    public function setFlagNullpathOk(bool $flag): void
29
    {
30
        $this->flag_nullpath_ok = $flag;
31
    }
32
33
    public function getFlagNullpathOk(): bool
34
    {
35
        return $this->flag_nullpath_ok;
36
    }
37
38
    public function setFlagNopath(bool $flag): void
39
    {
40
        $this->flag_nopath = $flag;
41
    }
42
43
    public function getFlagNopath(): bool
44
    {
45
        return $this->flag_nopath;
46
    }
47
48
    public function setFlagUtimeOmitOk(bool $flag): void
49
    {
50
        $this->flag_utime_omit_ok = $flag;
51
    }
52
53
    public function getFlagUtimeOmitOk(): bool
54
    {
55
        return $this->flag_utime_omit_ok;
56
    }
57
}
58