class NoRawSleepCallsRule implements Rule

Recommend the fakeable Sleep class over the native sleep() and usleep() functions.

Methods

__construct(ReflectionProvider $reflectionProvider)

Create a new raw sleep calls rule instance.

string
getNodeType()

Get the node type the rule checks.

array
processNode(Node $node, Scope $scope)

Report calls to the native sleep() and usleep() functions.

Details

at line 32
__construct(ReflectionProvider $reflectionProvider)

Create a new raw sleep calls rule instance.

Parameters

ReflectionProvider $reflectionProvider

at line 40
string getNodeType()

Get the node type the rule checks.

Return Value

string

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

Report calls to the native sleep() and usleep() functions.

Parameters

Node $node
Scope $scope

Return Value

array