Passed
Pull Request — 0.6.x (#198)
by Shinji
01:39
created

TargetProcessDescriptor::getInvalid()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 6
rs 10
c 1
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 PhpProfiler\Inspector\Daemon\Dispatcher;
15
16
use PhpProfiler\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 string $php_version,
25
    ) {
26
    }
27
28
    public static function getInvalid(): self
29
    {
30
        static $invalid = null;
31
        /** @var self */
32
        $invalid ??= new self(0, 0, ZendTypeReader::V80);
33
        return $invalid;
34
    }
35
}
36