Code Inspection: Usage of internal entity
Reports the usages of the entities that are marked as @internal
and are located in different source roots. The usages located in the same source root are not reported.
In most cases, the reported usages should be removed or replaced with other constructs.
![Internal entity usage Internal entity usage](https://resources.jetbrains.com/help/img/idea/2022.1/ps_internal-class-usage.png)
The folders configuration that you define for your project regulates whether an entity is treated as internal or not by PhpStorm:
In a project without any Sources
folders configured, no
@internal
classes' usages are marked.If an
@internal
class is located inside a configured Sourcesfolder, the usages within the same sources folder are not marked. Usages outside this sources folder are marked.
If an
@internal
class is located inside a library, all its usages outside libraries are marked.Inside the Test Sources
folder, no
@internal
classes' usages are marked.
See Configuring folders within a content root for details.
Suppress an inspection in the editor
Position the caret at the highlighted line and press Alt+Enter or click
.
Click the arrow next to the inspection you want to suppress and select the necessary suppress action.