UncastEnvValueRule
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
Create a new uncast env value rule instance.
Get the node type the rule checks.
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.
at line 62
string
getNodeType()
Get the node type the rule checks.
at line 75
array
processNode(Node $node, Scope $scope)
Report the array's uncast env values.