1.2.345. Dereferencing Levels

This is the counts of level of dereferencing.

Every time a -> object operator or ?-> null-safe object operator are used, this count as one level of dereferencing.

Fluent interfaces tends to have very high levels of deferencing.

<?php

// one level of dereferencing
$a->b;
$c->d();

// four levels of dereferencing
$a->b->c()->d->e();

// also four levels of dereferencing
$a->b?->c()->d->e();

?>

1.2.345.1. Specs

Short name

Dump/DereferencingLevels

Rulesets

All, CE, Dump

Exakat since

1.9.6

PHP Version

All

Severity

Minor

Time To Fix

Quick (30 mins)

Precision

Very high

Features

dereferencing

Available in

Entreprise Edition, Community Edition, Exakat Cloud