Enh #289: Add validation of renderers configuration to ViewTrait::withRenderers()
#930
Annotations
10 warnings
|
mutation / PHP 8.5-ubuntu-latest:
src/View.php#L46
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
$this->localeState = new LocaleState();
$this->themeState = new ThemeState();
$this->eventDispatcher = $eventDispatcher;
- $this->setPlaceholderSalt(__DIR__);
+
}
/**
* Returns a new instance with cleared state (blocks, parameters, etc.)
|
|
mutation / PHP 8.5-ubuntu-latest:
src/Theme.php#L133
Escaped Mutant for Mutator "ReturnRemoval":
@@ @@
public function applyTo(string $path): string
{
if ($this->pathMap === []) {
- return $path;
+
}
$path = FileHelper::normalizePath($path);
foreach ($this->pathMap as $from => $tos) {
|
|
mutation / PHP 8.5-ubuntu-latest:
src/State/WebViewState.php#L633
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
if (!is_string($key)) {
throw new InvalidArgumentException(sprintf('JS variable name should be string. Got %s.', get_debug_type($key)));
}
- if (!array_key_exists(1, $config)) {
+ if (!array_key_exists(2, $config)) {
throw new InvalidArgumentException('Do not set JS variable value.');
}
/** @var mixed */
|
|
mutation / PHP 8.5-ubuntu-latest:
src/State/WebViewState.php#L574
Escaped Mutant for Mutator "CastInt":
@@ @@
if (!is_string($file)) {
throw new InvalidArgumentException(sprintf('JS file should be string. Got %s.', get_debug_type($file)));
}
- $position = (int) ($config[1] ?? WebView::POSITION_END);
+ $position = $config[1] ?? WebView::POSITION_END;
unset($config[0], $config[1]);
$this->registerJsFile($file, $position, $config, $key);
}
|
|
mutation / PHP 8.5-ubuntu-latest:
src/State/WebViewState.php#L499
Escaped Mutant for Mutator "CastInt":
@@ @@
if (!is_string($file)) {
throw new InvalidArgumentException(sprintf('CSS file should be string. Got %s.', get_debug_type($file)));
}
- $position = (int) ($config[1] ?? WebView::POSITION_HEAD);
+ $position = $config[1] ?? WebView::POSITION_HEAD;
unset($config[0], $config[1]);
$this->registerCssFile($file, $position, $config, $key);
}
|
|
mutation / PHP 8.5-ubuntu-latest:
src/PhpTemplateRenderer.php#L33
Escaped Mutant for Mutator "FunctionCallRemoval":
@@ @@
};
$obInitialLevel = ob_get_level();
ob_start();
- ob_implicit_flush(false);
+
try {
/** @psalm-suppress PossiblyInvalidFunctionCall,PossiblyNullFunctionCall */
$renderer->bindTo($view)($template, $parameters);
|
|
mutation / PHP 8.5-ubuntu-latest:
src/PhpTemplateRenderer.php#L33
Escaped Mutant for Mutator "FalseValue":
@@ @@
};
$obInitialLevel = ob_get_level();
ob_start();
- ob_implicit_flush(false);
+ ob_implicit_flush(true);
try {
/** @psalm-suppress PossiblyInvalidFunctionCall,PossiblyNullFunctionCall */
$renderer->bindTo($view)($template, $parameters);
|
|
mutation / PHP 8.5-ubuntu-latest:
src/Cache/CachedContent.php#L65
Escaped Mutant for Mutator "OneZeroFloat":
@@ @@
*
* @return string The rendered cached content.
*/
- public function cache(string $content, DateInterval|int|null $ttl = 60, Dependency|null $dependency = null, float $beta = 1.0): string
+ public function cache(string $content, DateInterval|int|null $ttl = 60, Dependency|null $dependency = null, float $beta = 0.0): string
{
/** @psalm-suppress MixedArgument */
return $this->replaceDynamicPlaceholders($this->cache->getOrSet($this->cacheKey(), static fn(): string => $content, $ttl, $dependency, $beta));
|
|
mutation / PHP 8.5-ubuntu-latest:
src/Cache/CachedContent.php#L63
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
*
* @return string The rendered cached content.
*/
- public function cache(string $content, DateInterval|int|null $ttl = 60, Dependency|null $dependency = null, float $beta = 1.0): string
+ public function cache(string $content, DateInterval|int|null $ttl = 61, Dependency|null $dependency = null, float $beta = 1.0): string
{
/** @psalm-suppress MixedArgument */
return $this->replaceDynamicPlaceholders($this->cache->getOrSet($this->cacheKey(), static fn(): string => $content, $ttl, $dependency, $beta));
|
|
mutation / PHP 8.5-ubuntu-latest:
src/Cache/CachedContent.php#L63
Escaped Mutant for Mutator "DecrementInteger":
@@ @@
*
* @return string The rendered cached content.
*/
- public function cache(string $content, DateInterval|int|null $ttl = 60, Dependency|null $dependency = null, float $beta = 1.0): string
+ public function cache(string $content, DateInterval|int|null $ttl = 59, Dependency|null $dependency = null, float $beta = 1.0): string
{
/** @psalm-suppress MixedArgument */
return $this->replaceDynamicPlaceholders($this->cache->getOrSet($this->cacheKey(), static fn(): string => $content, $ttl, $dependency, $beta));
|