PhpStorm 2022.3 Help

Code Inspection: Compound namespace depth is more than 2

Reports the usages of compound namespaces whose depth exceeds two levels.

According to PSR-12, compound namespaces with a depth of more than two MUST NOT be used.

See PSR-12: Extended Coding Style (php-fig.org) for details.

Suppress an inspection in the editor

  1. Position the caret at the highlighted line and press Alt+Enter or click the Intention action icon.

  2. Click the arrow next to the inspection you want to suppress and select the necessary suppress action.

Last modified: 16 May 2022