Skip to content

Enhancement: Synchronize with ergebnis/php-package-template #2078

Enhancement: Synchronize with ergebnis/php-package-template

Enhancement: Synchronize with ergebnis/php-package-template #2078

Triggered via pull request September 9, 2023 07:44
Status Success
Total duration 1m 38s
Artifacts
This run and associated checks have been archived and are scheduled for deletion. Learn more about checks retention

integrate.yaml

on: pull_request
Matrix: Code Coverage
Matrix: Coding Standards
Matrix: Dependency Analysis
Matrix: Mutation Tests
Matrix: Refactoring
Matrix: Security Analysis
Matrix: Static Code Analysis
Matrix: Tests
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
Mutation Tests (8.1, locked): src/ChainNormalizer.php#L31
Escaped Mutant for Mutator "UnwrapArrayValues": --- Original +++ New @@ @@ private readonly array $normalizers; public function __construct(Normalizer ...$normalizers) { - $this->normalizers = \array_values($normalizers); + $this->normalizers = $normalizers; } public function normalize(Json $json) : Json {
Mutation Tests (8.1, locked): src/Exception/InvalidIndentStyle.php#L43
Escaped Mutant for Mutator "UnwrapArrayValues": --- Original +++ New @@ @@ { $exception = new self(\sprintf('Style needs to be one of "%s", but "%s" is not.', \implode('", "', $allowedStyles), $style)); $exception->style = $style; - $exception->allowedStyles = \array_values($allowedStyles); + $exception->allowedStyles = $allowedStyles; return $exception; } public function style() : string
Mutation Tests (8.1, locked): src/Exception/NormalizedInvalidAccordingToSchema.php#L39
Escaped Mutant for Mutator "UnwrapArrayValues": --- Original +++ New @@ @@ { $exception = new self(\sprintf('Normalized JSON is not valid according to schema "%s".', $schemaUri)); $exception->schemaUri = $schemaUri; - $exception->errors = \array_values($errors); + $exception->errors = $errors; return $exception; } public function schemaUri() : string
Mutation Tests (8.1, locked): src/Exception/OriginalInvalidAccordingToSchema.php#L39
Escaped Mutant for Mutator "UnwrapArrayValues": --- Original +++ New @@ @@ { $exception = new self(\sprintf('Original JSON is not valid according to schema "%s".', $schemaUri)); $exception->schemaUri = $schemaUri; - $exception->errors = \array_values($errors); + $exception->errors = $errors; return $exception; } public function schemaUri() : string
Mutation Tests (8.1, locked): src/Format/Indent.php#L65
Escaped Mutant for Mutator "UnwrapArrayKeys": --- Original +++ New @@ @@ throw Exception\InvalidIndentSize::fromSizeAndMinimumSize($size, $minimumSize); } if (!\array_key_exists($style, self::CHARACTERS)) { - throw Exception\InvalidIndentStyle::fromStyleAndAllowedStyles($style, ...\array_keys(self::CHARACTERS)); + throw Exception\InvalidIndentStyle::fromStyleAndAllowedStyles($style, ...self::CHARACTERS); } $value = \str_repeat(self::CHARACTERS[$style], $size); return new self($value);
Mutation Tests (8.1, locked): src/Format/JsonEncodeOptions.php#L50
Escaped Mutant for Mutator "Assignment": --- Original +++ New @@ @@ { $jsonEncodeOptions = 0; if (!\str_contains($json->encoded(), '\\/')) { - $jsonEncodeOptions |= \JSON_UNESCAPED_SLASHES; + $jsonEncodeOptions = \JSON_UNESCAPED_SLASHES; } if (1 !== \preg_match('/(\\\\+)u([0-9a-f]{4})/i', $json->encoded())) { $jsonEncodeOptions |= \JSON_UNESCAPED_UNICODE;
Mutation Tests (8.1, locked): src/Format/JsonEncodeOptions.php#L53
Escaped Mutant for Mutator "PregMatchRemoveFlags": --- Original +++ New @@ @@ if (!\str_contains($json->encoded(), '\\/')) { $jsonEncodeOptions |= \JSON_UNESCAPED_SLASHES; } - if (1 !== \preg_match('/(\\\\+)u([0-9a-f]{4})/i', $json->encoded())) { + if (1 !== \preg_match('/(\\\\+)u([0-9a-f]{4})/', $json->encoded())) { $jsonEncodeOptions |= \JSON_UNESCAPED_UNICODE; } return self::fromInt($jsonEncodeOptions);
Mutation Tests (8.1, locked): src/Format/NewLine.php#L33
Escaped Mutant for Mutator "PregMatchRemoveCaret": --- Original +++ New @@ @@ */ public static function fromString(string $value) : self { - if (1 !== \preg_match('/^(?>\\r\\n|\\n|\\r)$/', $value)) { + if (1 !== \preg_match('/(?>\\r\\n|\\n|\\r)$/', $value)) { throw Exception\InvalidNewLineString::fromString($value); } return new self($value);
Mutation Tests (8.1, locked): src/Format/NewLine.php#L33
Escaped Mutant for Mutator "PregMatchRemoveDollar": --- Original +++ New @@ @@ */ public static function fromString(string $value) : self { - if (1 !== \preg_match('/^(?>\\r\\n|\\n|\\r)$/', $value)) { + if (1 !== \preg_match('/^(?>\\r\\n|\\n|\\r)/', $value)) { throw Exception\InvalidNewLineString::fromString($value); } return new self($value);
Mutation Tests (8.1, locked): src/SchemaNormalizer.php#L198
Escaped Mutant for Mutator "UnwrapArrayIntersectKey": --- Original +++ New @@ @@ */ if ($dataShouldBeSorted && \property_exists($schema, 'properties') && \is_object($schema->properties)) { /** @var array<string, object> $objectPropertiesThatAreDefinedBySchema */ - $objectPropertiesThatAreDefinedBySchema = \array_intersect_key(\get_object_vars($schema->properties), \get_object_vars($data)); + $objectPropertiesThatAreDefinedBySchema = \get_object_vars($schema->properties); foreach ($objectPropertiesThatAreDefinedBySchema as $name => $valueSchema) { $value = $data->{$name}; $valueSchema = $this->resolveSchema($value, $valueSchema);