class ConfigTypeRule implements Rule

Reports typed config getters, such as Config::integer(), whose value never has the getter's type, so the call always throws.

Constants

private GETTER_TYPES

The value types the typed getters require, as the error message names them.

Methods

__construct(ConfigHelper $configHelper)

Create a new rule instance.

string
getNodeType()

Get the node type the rule checks.

array
processNode(Node $node, Scope $scope)

Report typed getter calls for config values that never have the getter's type.

Details

at line 44
__construct(ConfigHelper $configHelper)

Create a new rule instance.

Parameters

ConfigHelper $configHelper

at line 51
string getNodeType()

Get the node type the rule checks.

Return Value

string

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

Report typed getter calls for config values that never have the getter's type.

Parameters

Node $node
Scope $scope

Return Value

array