Skip to content

Terminology ​

These terms are used throughout the code and docs. Where one exists, they follow the PHP manual.

TermMeaningExample
ImportA use statement at the top level of a file, or one name within ituse A\B;
Local nameThe name an import gives you: its alias, or else its last segmentB
SegmentOne part of a name, between separatorsA
Import rootA namespace configured to be importedG\H\I
Exact rootA root imported under its last segmentG\H\I
Aliased rootA root imported under an aliasG\H\I as L
Wildcard rootA root completed by the one segment after its prefixA\B\C\*
Root fileA JSON file of import roots, which can include othersnamespace-shortener.json
Unqualified nameA name with no separatorE
Qualified nameA name with a separator, not at the startD\E
Fully qualified nameA name starting with a separator\A\B\C\D\E
Relative nameA name starting with the namespace keywordnamespace\D\E
ScopeA namespace block, or a whole file without one. Imports belong to a scope
UsageA name that resolves through an importnew E()
TargetAn import that a scope needs after rewriting
ConflictA reason a rewrite can't safely be made
ToolA coding standard tool the rule runs inPHP-CS-Fixer, PHP_CodeSniffer
AdapterThe package connecting the rule to one tooldpi/namespace-shortener-phpcs
CoreThe package holding the rule itself, which adapters sharedpi/namespace-shortener-core
Check modeA run that reports what would change, and writes nothingphpcs
Fix modeA run that applies the changesphpcbf