TargetPhpSettings   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
/**
4
 * This file is part of the sj-i/php-profiler 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\Settings\TargetPhpSettings;
15
16
use PhpProfiler\Lib\PhpInternals\ZendTypeReader;
17
18
/**
19
 * @template TVersion of value-of<ZendTypeReader::ALL_SUPPORTED_VERSIONS>|'auto'
20
 * @immutable
21
 */
22
final class TargetPhpSettings
23
{
24
    public const PHP_REGEX_DEFAULT = '.*/(php(74|7.4|80|8.0|81|8.1)?|php-fpm|libphp[78]?.*\.so)$';
25
    public const LIBPTHREAD_REGEX_DEFAULT = '.*/libpthread.*\.so';
26
    public const TARGET_PHP_VERSION_DEFAULT = 'auto';
27
28
    /** @param TVersion $php_version */
0 ignored issues
show
Bug introduced by
The type PhpProfiler\Inspector\Se...getPhpSettings\TVersion 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...
29
    public function __construct(
30
        public string $php_regex = self::PHP_REGEX_DEFAULT,
31
        public string $libpthread_regex = self::LIBPTHREAD_REGEX_DEFAULT,
32
        public string $php_version = self::TARGET_PHP_VERSION_DEFAULT,
33
        public ?string $php_path = null,
34
        public ?string $libpthread_path = null
35
    ) {
36
    }
37
}
38