Merge pull request #354 from gacela-project/perf/caching-system #387
Annotations
10 warnings
|
Mutation Tests:
src/Framework/Bootstrap/Setup/PropertyMerger.php#L57
Escaped Mutant for Mutator "UnwrapArrayValues":
@@ @@
{
$current = $this->setup->getGacelaConfigsToExtend();
/** @var list<class-string> $merged */
- $merged = array_values(array_unique(array_merge($current, $list)));
+ $merged = array_unique(array_merge($current, $list));
$this->setup->setGacelaConfigsToExtend($merged);
}
/**
|
|
Mutation Tests:
src/Framework/Bootstrap/Setup/PropertyMerger.php#L57
Escaped Mutant for Mutator "UnwrapArrayMerge":
@@ @@
{
$current = $this->setup->getGacelaConfigsToExtend();
/** @var list<class-string> $merged */
- $merged = array_values(array_unique(array_merge($current, $list)));
+ $merged = array_values(array_unique($list));
$this->setup->setGacelaConfigsToExtend($merged);
}
/**
|
|
Mutation Tests:
src/Framework/Bootstrap/Setup/PropertyMerger.php#L57
Escaped Mutant for Mutator "UnwrapArrayMerge":
@@ @@
{
$current = $this->setup->getGacelaConfigsToExtend();
/** @var list<class-string> $merged */
- $merged = array_values(array_unique(array_merge($current, $list)));
+ $merged = array_values(array_unique($current));
$this->setup->setGacelaConfigsToExtend($merged);
}
/**
|
|
Mutation Tests:
src/Framework/Bootstrap/Setup/PropertyChangeTracker.php#L24
Escaped Mutant for Mutator "FalseValue":
@@ @@
}
public function isChanged(string $propertyName): bool
{
- return $this->changedProperties[$propertyName] ?? false;
+ return $this->changedProperties[$propertyName] ?? true;
}
/**
* @return array<string,bool>
|
|
Mutation Tests:
src/Framework/Attribute/CacheableTrait.php#L89
Escaped Mutant for Mutator "CastInt":
@@ @@
private function getReflectionMethod(string $method): ReflectionMethod
{
// Extract just the method name if it's a full class::method string
- $methodName = str_contains($method, '::') ? substr($method, (int) strrpos($method, '::') + 2) : $method;
+ $methodName = str_contains($method, '::') ? substr($method, strrpos($method, '::') + 2) : $method;
return (new ReflectionClass($this))->getMethod($methodName);
}
/**
|
|
Mutation Tests:
src/Framework/Attribute/CacheableTrait.php#L65
Escaped Mutant for Mutator "GreaterThan":
@@ @@
// Check if we have a valid cached value
if (isset(self::$methodCache[$cacheKey])) {
$cached = self::$methodCache[$cacheKey];
- if ($cached['expires'] > $currentTime) {
+ if ($cached['expires'] >= $currentTime) {
return $cached['result'];
}
// Expired, remove it
|
|
Mutation Tests:
src/Framework/Attribute/CacheableTrait.php#L50
Escaped Mutant for Mutator "ProtectedVisibility":
@@ @@
*
* @param list<mixed> $args
*/
- protected function cached(string $method, array $args, callable $callback): mixed
+ private function cached(string $method, array $args, callable $callback): mixed
{
$reflectionMethod = $this->getReflectionMethod($method);
$cacheableAttr = $this->getCacheableAttribute($reflectionMethod);
|
|
Mutation Tests:
src/Framework/Attribute/Cacheable.php#L32
Escaped Mutant for Mutator "DecrementInteger":
@@ @@
* @param int $ttl Time-to-live in seconds (default: 3600 = 1 hour)
* @param string|null $key Custom cache key (default: auto-generated from class::method::args)
*/
- public function __construct(public readonly int $ttl = 3600, public readonly ?string $key = null)
+ public function __construct(public readonly int $ttl = 3599, public readonly ?string $key = null)
{
}
}
|
|
Mutation Tests:
src/Framework/Attribute/Cacheable.php#L32
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
* @param int $ttl Time-to-live in seconds (default: 3600 = 1 hour)
* @param string|null $key Custom cache key (default: auto-generated from class::method::args)
*/
- public function __construct(public readonly int $ttl = 3600, public readonly ?string $key = null)
+ public function __construct(public readonly int $ttl = 3601, public readonly ?string $key = null)
{
}
}
|
|
Mutation Tests:
src/Framework/AbstractFactory.php#L68
Escaped Mutant for Mutator "InstanceOf_":
@@ @@
// Temporal solution to keep BC with the AbstractDependencyProvider
$dpResolver = (new DependencyProviderResolver())->resolve($this);
$dpResolver?->provideModuleDependencies($container);
- if (!$resolver instanceof AbstractProvider && !$dpResolver instanceof AbstractProvider) {
+ if (!false && !$dpResolver instanceof AbstractProvider) {
throw new ProviderNotFoundException(static::class);
}
}
|