NewObjectConfiguration
API reference › PHPStan › rules › NewObjectConfiguration
Represents the configuration of a direct new construction whose class and assignment path are proven.
NewObjectConfigurationResolver for the conditions under which a configuration is resolved.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$classReflection readonly constructor | PHPStan\ | Class that new constructs and configures. | NewObjectConfiguration |
$options readonly constructor | list<array{string, | Name, reported line and effective value of each distinct option, in first-occurrence order, as ObjectConfigurationReader::options() reads them. Every key is assigned, class, __class and __construct() included. | NewObjectConfiguration |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Stores the constructed class and effective configuration options. | NewObjectConfiguration |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(PHPStan\Reflection\ClassReflection $classReflection, list<array{string, int, PhpParser\Node\Expr|PHPStan\Type\Type}> $options)Stores the constructed class and effective configuration options.
Parameters
| Parameter | Type | Description |
|---|---|---|
$classReflection | PHPStan\ | Class that new constructs and configures. |
$options | list<array{string, | Name, reported line and effective value of each distinct option, in first-occurrence order, as ObjectConfigurationReader::options() reads them. Every key is assigned, class, __class and __construct() included. |