SwallowedCancellationCollector
class SwallowedCancellationCollector implements Collector
| internal |
Collects a try whose block runs an operation that can deliver cancellation, where the catch receiving the cancellation doesn't propagate it. The rule reports those that run in a request, job or operation.
Constants
| private DATABASE |
|
| private REDIS |
|
| private HTTP |
|
| private WAIT |
|
| private FUNCTIONS |
The functions that wait, so a cancellation can reach them while they run. |
| private CONNECTION_METHODS |
The lowercase connection methods that run a query. |
| private QUERY_METHODS |
The lowercase query builder methods that run a query. |
| private ELOQUENT_METHODS |
The lowercase Eloquent builder methods beyond the query builder's that run a query. |
| private MODEL_METHODS |
The lowercase model methods that run a query, including the protected increments its __call() runs. |
| private COLLECTION_METHODS |
The lowercase Eloquent collection methods that load from the database. |
| private RELATION_CREATE_METHODS |
The lowercase relation methods that find or create related models, on the relations that declare them. |
| private RELATION_SAVE_METHODS |
The lowercase relation methods that save related models, on the relations that declare them. |
| private RELATION_QUERY_METHODS |
The lowercase relation methods that query related models, on the relations that declare them. |
| private SCHEMA_METHODS |
The lowercase schema builder methods that run a statement or read the schema. The base builder's
dropAllTables(), dropAllViews() and dropAllTypes() only throw, so only driver overrides count. |
| private PIVOT_METHODS |
The lowercase pivot table methods of a many-to-many relation that write the pivot table. |
| private HTTP_METHODS |
The lowercase HTTP client methods that send a request. |
| private OPERATIONS |
The operation each class's or trait's own declarations run, with the lowercase methods that run it. An override is judged by its own declaration, so its class has no entry. |
| private LAZY_METHODS |
The lowercase query builder methods that return a lazy query. |
| private LAZY_QUERIES |
The lowercase methods returning a lazy query, which runs its queries while it's iterated, on the classes that
declare them. |
| private SLEEP_FACTORIES |
The lowercase static methods that create a sleep. |
| private REDIS_CLASSES |
The classes whose declarations run Redis commands. |
| private REDIS_METHODS |
The lowercase Redis methods, beyond the commands, that run a command while they're called. |
Methods
Create a new collector instance.
Get the node type the collector inspects.
Collect the try when the catch receiving cancellation swallows it and the block can deliver one.
Details
at line 401
__construct(ReflectionProvider $reflectionProvider, WorkerStateHelper $helper, CoroutineRuleHelper $coroutineRuleHelper, ConstructorParser $constructorParser)
Create a new collector instance.
at line 412
string
getNodeType()
Get the node type the collector inspects.
at line 425
array|null
processNode(Node $node, Scope $scope)
Collect the try when the catch receiving cancellation swallows it and the block can deliver one.