class DiscardedDateRule implements Rule

internal  
 

Reports a Carbon date change whose result is discarded, which leaves an immutable date unchanged.

Constants

private DATE_CLASSES

The classes whose native methods and @method tags are Carbon's own date methods.

private MODIFIERS

The lowercase names of the date modifiers outside MODIFIER_PATTERN.

private MODIFIER_PATTERN

Match the lowercase names of the modifier families, and of each unit setter in its plain, plural, set and set-plural forms.

private GETTER_SETTERS

The lowercase names of the methods that get a value without an argument and set it with one.

private UNIT_OF_UNIT_PATTERN

Match Carbon's unit-of-unit getter/setters, such as dayOfWeek() and weekOfYear().

Carbon dispatches these names case-sensitively, so this pattern does too.

Methods

string
getNodeType()

Get the node type the rule checks.

array
processNode(Node $node, Scope $scope)

Report a discarded date change.

Details

at line 121
string getNodeType()

Get the node type the rule checks.

Return Value

string

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

Report a discarded date change.

Parameters

Node $node
Scope $scope

Return Value

array