ObjectCreator: cache created reflections #724
ci.yaml
on: push
Matrix: Tests
Matrix: Coding standard
Matrix: Static analysis
Matrix: Test for mutants
Matrix: Code coverage finish
Status check - CI
4s
Annotations
10 warnings
Test for mutants (ubuntu-latest, 8.4):
src/Args/ArgsChecker.php#L46
Escaped Mutant for Mutator "Foreach_":
@@ @@
public function checkAllowedArgs(array $argNames): void
{
$actualArgNames = array_keys($this->args);
- foreach ($actualArgNames as $name) {
+ foreach ([] as $name) {
if (!in_array($name, $argNames, true)) {
$hint = Helpers::getSuggestion($argNames, (string) $name);
throw InvalidArgument::create()->withMessage(sprintf('Unknown argument "%s" given to "%s"%s', $name, $this->class, $hint !== null ? sprintf(', did you mean "%s"?', $hint) : ''));
|
Test for mutants (ubuntu-latest, 8.4):
src/Args/ArgsChecker.php#L138
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation":
@@ @@
public function checkNullableInt(string $argName): ?int
{
$argValue = $this->args[$argName];
- if ($argValue !== null && !is_int($argValue)) {
+ if (!($argValue !== null) && is_int($argValue)) {
throw InvalidArgument::create()->withMessage($this->formatMessage('int|null', $argName, $argValue));
}
return $argValue;
|
Test for mutants (ubuntu-latest, 8.4):
src/Args/ArgsChecker.php#L170
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation":
@@ @@
if (is_int($argValue)) {
$argValue = (float) $argValue;
}
- if ($argValue !== null && !is_float($argValue)) {
+ if (!($argValue !== null) && is_float($argValue)) {
throw InvalidArgument::create()->withMessage($this->formatMessage('float|null', $argName, $argValue));
}
return $argValue;
|
Test for mutants (ubuntu-latest, 8.4):
src/Args/ArgsChecker.php#L194
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation":
@@ @@
public function checkNullableString(string $argName): ?string
{
$argValue = $this->args[$argName];
- if ($argValue !== null && !is_string($argValue)) {
+ if (!($argValue !== null) && is_string($argValue)) {
throw InvalidArgument::create()->withMessage($this->formatMessage('string|null', $argName, $argValue));
}
return $argValue;
|
Test for mutants (ubuntu-latest, 8.4):
src/Args/ArgsChecker.php#L241
Escaped Mutant for Mutator "InstanceOf_":
@@ @@
public function checkInstanceOf(string $argName, string $className): object
{
$argValue = $this->args[$argName];
- if (!$argValue instanceof $className) {
+ if (!true) {
throw InvalidArgument::create()->withMessage($this->formatMessage("instance of {$className}", $argName, $argValue));
}
return $argValue;
|
Test for mutants (ubuntu-latest, 8.4):
src/Args/ArgsChecker.php#L258
Escaped Mutant for Mutator "InstanceOf_":
@@ @@
public function checkNullableInstanceOf(string $argName, string $className): ?object
{
$argValue = $this->args[$argName];
- if ($argValue !== null && !$argValue instanceof $className) {
+ if ($argValue !== null && !true) {
throw InvalidArgument::create()->withMessage($this->formatMessage("instance of {$className}", $argName, $argValue));
}
return $argValue;
|
Test for mutants (ubuntu-latest, 8.4):
src/Args/ArgsChecker.php#L258
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation":
@@ @@
public function checkNullableInstanceOf(string $argName, string $className): ?object
{
$argValue = $this->args[$argName];
- if ($argValue !== null && !$argValue instanceof $className) {
+ if (!($argValue !== null) && $argValue instanceof $className) {
throw InvalidArgument::create()->withMessage($this->formatMessage("instance of {$className}", $argName, $argValue));
}
return $argValue;
|
Test for mutants (ubuntu-latest, 8.4):
src/Callbacks/AfterMappingCallback.php#L48
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
public static function resolveArgs(array $args, MetaContext $context, Reflector $reflector): AfterMappingCallbackArgs
{
$checker = new ArgsChecker($args, self::class);
- $checker->checkAllowedArgs([self::Method]);
+
$checker->checkRequiredArg(self::Method);
$methodName = $checker->checkString(self::Method);
if (!$reflector instanceof ReflectionClass) {
|
Test for mutants (ubuntu-latest, 8.4):
src/Callbacks/AfterMappingCallback.php#L50
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
{
$checker = new ArgsChecker($args, self::class);
$checker->checkAllowedArgs([self::Method]);
- $checker->checkRequiredArg(self::Method);
+
$methodName = $checker->checkString(self::Method);
if (!$reflector instanceof ReflectionClass) {
throw InvalidArgument::create()->withMessage(sprintf('"%s" can be defined only above a class.', self::class));
|
Test for mutants (ubuntu-latest, 8.4):
src/Callbacks/AfterMappingCallback.php#L53
Escaped Mutant for Mutator "InstanceOf_":
@@ @@
$checker->checkAllowedArgs([self::Method]);
$checker->checkRequiredArg(self::Method);
$methodName = $checker->checkString(self::Method);
- if (!$reflector instanceof ReflectionClass) {
+ if (!true) {
throw InvalidArgument::create()->withMessage(sprintf('"%s" can be defined only above a class.', self::class));
}
$method = self::validateMethod($reflector, $methodName);
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
Logs - Mutations
|
32.2 KB |
|