| Total Complexity | 1 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | abstract class SplType implements |
||
| 24 | \JsonSerializable, |
||
| 25 | \Stringable |
||
| 26 | { |
||
| 27 | /** @use SplTypeTrait<T> */ |
||
| 28 | use SplTypeTrait; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Default value. |
||
| 32 | * |
||
| 33 | * @var mixed |
||
| 34 | */ |
||
| 35 | // phpcs:ignore Generic.NamingConventions.UpperCaseConstantName.ClassConstantNotUpperCase |
||
| 36 | protected const __default = null; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Creates a new value of some type. |
||
| 40 | * |
||
| 41 | * @param mixed $initial_value Type and default value depends on the extension class. |
||
| 42 | * @param bool $strict Whether to set the object's sctrictness. |
||
| 43 | * |
||
| 44 | * @return void |
||
| 45 | * |
||
| 46 | * @phpstan-param T|null $initial_value Type and default value depends on the extension class. |
||
| 47 | * @phpstan-param bool $strict Whether to set the object's sctrictness. |
||
| 48 | * @phpstan-ignore-next-line |
||
| 49 | * |
||
| 50 | * @psalm-suppress PossiblyUnusedParam |
||
| 51 | * |
||
| 52 | * @SuppressWarnings(PHPMD.CamelCaseParameterName) |
||
| 53 | * @SuppressWarnings(PHPMD.CamelCaseVariableName) |
||
| 54 | * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
||
| 55 | */ |
||
| 56 | 25 | public function __construct($initial_value = self::__default, /** @scrutinizer ignore-unused */ bool $strict = true) |
|
| 62 |