class UncastEnvValueRule implements Rule

internal  
 

Reports a config value that is an uncast env() read with a bool, int or float default.

The environment holds strings, so the value has the default's type only while the variable is unset. A read counts when its value reaches the config value unchanged: directly, through an assignment, the branches of ?:, ?? and ternaries, or as another read's default. A read in a condition or cast is converted, and values passed through other calls or variables are not followed.

Methods

__construct(ConfigSourceResolver $configSourceResolver, ReflectionProvider $reflectionProvider, RuntimeInputs $runtimeInputs)

Create a new uncast env value rule instance.

string
getNodeType()

Get the node type the rule checks.

array
processNode(Node $node, Scope $scope)

Report the array's uncast env values.

Details

at line 52
__construct(ConfigSourceResolver $configSourceResolver, ReflectionProvider $reflectionProvider, RuntimeInputs $runtimeInputs)

Create a new uncast env value rule instance.

Parameters

ConfigSourceResolver $configSourceResolver
ReflectionProvider $reflectionProvider
RuntimeInputs $runtimeInputs

at line 62
string getNodeType()

Get the node type the rule checks.

Return Value

string

at line 75
array processNode(Node $node, Scope $scope)

Report the array's uncast env values.

Parameters

Node $node
Scope $scope

Return Value

array