Remove conflicting dev dependency #328
Annotations
10 warnings
src/Bridge/NetteCaching/CachedCatalogue.php#L41
Escaped Mutant for Mutator "Identical":
@@ @@
public function getMessage(string $message, string $languageTag): ?string
{
$messages = $this->arrayCache[$languageTag] ?? null;
- if ($messages === null) {
+ if ($messages !== null) {
$messages = $this->cache->load($languageTag, function () use ($languageTag): array {
$this->loadedFromLoader[$languageTag] = null;
return $this->loader->loadAllMessages($languageTag);
|
src/Bridge/NetteCaching/CachedCatalogue.php#L57
Escaped Mutant for Mutator "Identical":
@@ @@
$this->arrayCache[$languageTag] = $messages;
}
$translation = $messages[$message] ?? null;
- if ($translation === null && $this->debugMode && !array_key_exists($languageTag, $this->loadedFromLoader)) {
+ if ($translation !== null && $this->debugMode && !array_key_exists($languageTag, $this->loadedFromLoader)) {
$this->loadedFromLoader[$languageTag] = null;
$messages = $this->loader->loadAllMessages($languageTag);
$this->arrayCache[$languageTag] = $messages;
|
src/Bridge/NetteCaching/CachedCatalogue.php#L57
Escaped Mutant for Mutator "LogicalNot":
@@ @@
$this->arrayCache[$languageTag] = $messages;
}
$translation = $messages[$message] ?? null;
- if ($translation === null && $this->debugMode && !array_key_exists($languageTag, $this->loadedFromLoader)) {
+ if ($translation === null && $this->debugMode && array_key_exists($languageTag, $this->loadedFromLoader)) {
$this->loadedFromLoader[$languageTag] = null;
$messages = $this->loader->loadAllMessages($languageTag);
$this->arrayCache[$languageTag] = $messages;
|
src/Bridge/NetteCaching/CachedCatalogue.php#L57
Escaped Mutant for Mutator "LogicalAnd":
@@ @@
$this->arrayCache[$languageTag] = $messages;
}
$translation = $messages[$message] ?? null;
- if ($translation === null && $this->debugMode && !array_key_exists($languageTag, $this->loadedFromLoader)) {
+ if ($translation === null && $this->debugMode || !array_key_exists($languageTag, $this->loadedFromLoader)) {
$this->loadedFromLoader[$languageTag] = null;
$messages = $this->loader->loadAllMessages($languageTag);
$this->arrayCache[$languageTag] = $messages;
|
src/Bridge/NetteCaching/CachedCatalogue.php#L57
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation":
@@ @@
$this->arrayCache[$languageTag] = $messages;
}
$translation = $messages[$message] ?? null;
- if ($translation === null && $this->debugMode && !array_key_exists($languageTag, $this->loadedFromLoader)) {
+ if (!($translation === null) && !$this->debugMode && array_key_exists($languageTag, $this->loadedFromLoader)) {
$this->loadedFromLoader[$languageTag] = null;
$messages = $this->loader->loadAllMessages($languageTag);
$this->arrayCache[$languageTag] = $messages;
|
src/Bridge/NetteCaching/CachedCatalogue.php#L57
Escaped Mutant for Mutator "LogicalAndNegation":
@@ @@
$this->arrayCache[$languageTag] = $messages;
}
$translation = $messages[$message] ?? null;
- if ($translation === null && $this->debugMode && !array_key_exists($languageTag, $this->loadedFromLoader)) {
+ if (!($translation === null && $this->debugMode && !array_key_exists($languageTag, $this->loadedFromLoader))) {
$this->loadedFromLoader[$languageTag] = null;
$messages = $this->loader->loadAllMessages($languageTag);
$this->arrayCache[$languageTag] = $messages;
|
src/Bridge/NetteDI/LazyLoaderManager.php#L25
Escaped Mutant for Mutator "Foreach_":
@@ @@
return $this->loaders;
}
$loaders = [];
- foreach ($this->getKeys() as $key) {
+ foreach ([] as $key) {
$loaders[$key] = $this->getTypedServiceOrThrow($key, Loader::class);
}
return $this->loaders = $loaders;
}
}
|
src/Bridge/NetteDI/LocalizationExtension.php#L95
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
$builder = $this->getContainerBuilder();
$config = $this->config;
$loader = new DefinitionsLoader($this->compiler);
- $this->registerConfigurators($builder, $config, $loader);
+
$localesDefinition = $this->registerLocales($builder, $config);
$localeProcessorDefinition = $this->registerLocaleProcessor($builder);
$translatorDefinition = $this->registerTranslator($builder, $localesDefinition, $this->registerResolver($builder, $config, $loader), $this->registerCatalogue($builder, $config, $this->registerLoader($builder, $config, $loader)), $this->registerMessageFormatter($builder), $this->registerTranslationLogger($builder), $localeProcessorDefinition);
|
src/Bridge/NetteDI/LocalizationExtension.php#L143
Escaped Mutant for Mutator "Foreach_":
@@ @@
private function registerConfigurators(ContainerBuilder $builder, stdClass $config, DefinitionsLoader $loader): void
{
$configuratorDefinitions = [];
- foreach ($config->configurators as $configuratorKey => $configuratorConfig) {
+ foreach ([] as $configuratorKey => $configuratorConfig) {
$configuratorDefinition = $loader->loadDefinitionFromConfig($configuratorConfig, $this->prefix('configurator.' . $configuratorKey));
$configuratorDefinitions[] = $configuratorDefinition;
}
|
src/Bridge/NetteDI/LocalizationExtension.php#L152
Escaped Mutant for Mutator "NotIdentical":
@@ @@
$configuratorDefinition = $loader->loadDefinitionFromConfig($configuratorConfig, $this->prefix('configurator.' . $configuratorKey));
$configuratorDefinitions[] = $configuratorDefinition;
}
- if ($configuratorDefinitions !== []) {
+ if ($configuratorDefinitions === []) {
$builder->addDefinition($this->prefix('configurators'))->setFactory(MultiLocaleConfigurator::class, [$configuratorDefinitions])->setType(LocaleConfigurator::class);
}
}
|
This job succeeded
Loading