NoMissingTranslationsRule
class NoMissingTranslationsRule implements Rule
Upstream compares each key with the keys in the lang files. This rule asks the booted translator, so fallbacks, JSON, namespaces and boot-added lines count, and reports only keys whose group exists.
Traits
Properties
| protected Container|null | $container | from HasContainer |
Methods
__construct(UsedTranslationViewCollector $usedTranslationViewCollector, ViewFileHelper $viewFileHelper, Filesystem $filesystem, RuntimeInputs $runtimeInputs, array $translationDirectories)
Create a new rule instance.
string
getNodeType()
Get the node type the rule inspects.
array
processNode(Node $node, Scope $scope)
Report collected translation lookups the translator cannot resolve.
Details
in
HasContainer at line 19
void
setContainer(Container $container)
Set the container used for resolution.
in
HasContainer at line 27
Container
getContainer()
Return the current container.
in
HasContainer at line 35
mixed
resolve(string $abstract)
Resolve the given type from the container.
at line 56
__construct(UsedTranslationViewCollector $usedTranslationViewCollector, ViewFileHelper $viewFileHelper, Filesystem $filesystem, RuntimeInputs $runtimeInputs, array $translationDirectories)
Create a new rule instance.
at line 69
string
getNodeType()
Get the node type the rule inspects.
at line 80
array
processNode(Node $node, Scope $scope)
Report collected translation lookups the translator cannot resolve.