Passed
Push — 0.6.x ( 9a1948...a98caa )
by Shinji
03:23 queued 01:32
created

TargetProcessDescriptor::getInvalid()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * This file is part of the sj-i/ 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 Reli\Inspector\Daemon\Dispatcher;
15
16
use Reli\Lib\PhpInternals\ZendTypeReader;
17
18
final class TargetProcessDescriptor
19
{
20
    /** @param value-of<ZendTypeReader::ALL_SUPPORTED_VERSIONS> $php_version */
0 ignored issues
show
Documentation Bug introduced by
The doc comment value-of<ZendTypeReader::ALL_SUPPORTED_VERSIONS> at position 0 could not be parsed: Unknown type name 'value-of' at position 0 in value-of<ZendTypeReader::ALL_SUPPORTED_VERSIONS>.
Loading history...
21
    public function __construct(
22
        public int $pid,
23
        public int $eg_address,
24
        public int $sg_address,
25
        public string $php_version,
26
    ) {
27
    }
28
29
    public static function getInvalid(): self
30
    {
31
        static $invalid = null;
32
        /** @var self */
33
        $invalid ??= new self(0, 0, 0, ZendTypeReader::V80);
34
        return $invalid;
35
    }
36
}
37