Fix theme clearing in withClearedState()
#845
Annotations
11 warnings
mutation / PHP 8.3-ubuntu-latest
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
mutation / PHP 8.3-ubuntu-latest:
src/Cache/CachedContent.php#L66
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
*
* @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));
|
mutation / PHP 8.3-ubuntu-latest:
src/Cache/CachedContent.php#L66
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
*
* @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.3-ubuntu-latest:
src/Cache/CachedContent.php#L68
Escaped Mutant for Mutator "OneZeroFloat":
--- Original
+++ New
@@ @@
*
* @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.3-ubuntu-latest:
src/PhpTemplateRenderer.php#L33
Escaped Mutant for Mutator "FunctionCallRemoval":
--- Original
+++ New
@@ @@
};
$obInitialLevel = ob_get_level();
ob_start();
- ob_implicit_flush(false);
+
try {
/** @psalm-suppress PossiblyInvalidFunctionCall,PossiblyNullFunctionCall */
$renderer->bindTo($view)($template, $parameters);
|
mutation / PHP 8.3-ubuntu-latest:
src/State/WebViewState.php#L633
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
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.3-ubuntu-latest:
src/View.php#L67
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
public function beginPage() : void
{
ob_start();
- ob_implicit_flush(false);
+ ob_implicit_flush(true);
$this->eventDispatcher?->dispatch(new PageBegin($this));
}
/**
|
mutation / PHP 8.3-ubuntu-latest:
src/View.php#L67
Escaped Mutant for Mutator "FunctionCallRemoval":
--- Original
+++ New
@@ @@
public function beginPage() : void
{
ob_start();
- ob_implicit_flush(false);
+
$this->eventDispatcher?->dispatch(new PageBegin($this));
}
/**
|
mutation / PHP 8.3-ubuntu-latest:
src/ViewTrait.php#L117
Escaped Mutant for Mutator "UnwrapArrayValues":
--- Original
+++ New
@@ @@
public function withFallbackExtension(string $fallbackExtension, string ...$otherFallbacks) : static
{
$new = clone $this;
- $new->fallbackExtensions = [$fallbackExtension, ...array_values($otherFallbacks)];
+ $new->fallbackExtensions = [$fallbackExtension, ...$otherFallbacks];
return $new;
}
/**
|
mutation / PHP 8.3-ubuntu-latest:
src/ViewTrait.php#L435
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
throw new ViewNotFoundException("The view file \"{$viewFile}\" does not exist.");
}
$output = '';
- $this->viewFiles[] = ['resolved' => $viewFile, 'requested' => $requestedFile];
+ $this->viewFiles[] = ['requested' => $requestedFile];
if ($this->beforeRender($viewFile, $parameters)) {
$ext = pathinfo($viewFile, PATHINFO_EXTENSION);
$renderer = $this->renderers[$ext] ?? new PhpTemplateRenderer();
|
mutation / PHP 8.3-ubuntu-latest:
src/ViewTrait.php#L442
Escaped Mutant for Mutator "Coalesce":
--- Original
+++ New
@@ @@
$this->viewFiles[] = ['resolved' => $viewFile, 'requested' => $requestedFile];
if ($this->beforeRender($viewFile, $parameters)) {
$ext = pathinfo($viewFile, PATHINFO_EXTENSION);
- $renderer = $this->renderers[$ext] ?? new PhpTemplateRenderer();
+ $renderer = new PhpTemplateRenderer() ?? $this->renderers[$ext];
$output = $renderer->render($this, $viewFile, $parameters);
$output = $this->afterRender($viewFile, $parameters, $output);
}
|