class NoRawCoroutinesRule implements Rule

internal  
 

Reports coroutines started directly through Swoole or the engine.

An exception that escapes such a coroutine, including a cancellation, is a fatal error that stops the worker. The framework's coroutines catch and report it.

Constants

private FUNCTION

The function that starts a raw coroutine. Swoole's global go() needs short names, which the framework rejects.

private METHODS

The declaring classes of the methods that start a raw coroutine, by lowercase method name.

Methods

__construct(ReflectionProvider $reflectionProvider, FacadeHelper $facadeHelper)

Create a new raw coroutines rule instance.

string
getNodeType()

Get the node type the rule checks.

array
processNode(Node $node, Scope $scope)

Report a call that starts a raw coroutine.

Details

at line 59
__construct(ReflectionProvider $reflectionProvider, FacadeHelper $facadeHelper)

Create a new raw coroutines rule instance.

Parameters

ReflectionProvider $reflectionProvider
FacadeHelper $facadeHelper

at line 68
string getNodeType()

Get the node type the rule checks.

Return Value

string

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

Report a call that starts a raw coroutine.

Parameters

Node $node
Scope $scope

Return Value

array