UtimBuf   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 7
c 1
b 0
f 1
dl 0
loc 16
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getCTypeName() 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\Libc\Utime;
15
16
use Fuse\FFI\TypedCDataDefaultImplementationTrait;
17
use TypedCData\TypedCDataInterface;
0 ignored issues
show
Bug introduced by
The type TypedCData\TypedCDataInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
18
19
/**
20
 * struct utimbuf
21
 * {
22
 *     long actime;
23
 *     long modtime;
24
 * };
25
 */
26
final class UtimBuf implements TypedCDataInterface
27
{
28
    use TypedCDataDefaultImplementationTrait;
29
30
    public int $actime;
31
    public int $modtime;
32
33
    public static function getCTypeName(): string
34
    {
35
        return 'struct utimbuf';
36
    }
37
38
    public function __construct(int $actime = 0, int $modtime = 0)
39
    {
40
        $this->actime = $actime;
41
        $this->modtime = $modtime;
42
    }
43
}
44