Skip to content

update to use the new method names for code generation #1117

update to use the new method names for code generation

update to use the new method names for code generation #1117

Triggered via push February 14, 2026 19:50
Status Failure
Total duration 2m 0s
Artifacts

ci.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

30 warnings
PHP 8.5: src/JsonSchemaCodeGenerator.php#L309
Escaped Mutant for Mutator "ArrayItemRemoval": @@ @@ /** @var array<string, mixed> $merged */ $merged = [ - 'type' => 'object', 'properties' => $mergedProperties, 'required' => array_values(array_unique($mergedRequired)), ];
PHP 8.5: src/JsonSchemaCodeGenerator.php#L295
Escaped Mutant for Mutator "LogicalAnd": @@ @@ $mergedRequired = []; foreach ($schemas as $subSchema) { - if (isset($subSchema['properties']) && \is_array($subSchema['properties'])) { + if (isset($subSchema['properties']) || \is_array($subSchema['properties'])) { /** @var array<string, array<string, mixed>> $props */ $props = $subSchema['properties']; $mergedProperties = array_merge($mergedProperties, $props);
PHP 8.5: src/JsonSchemaCodeGenerator.php#L262
Escaped Mutant for Mutator "CastString": @@ @@ // The discriminator field must appear in ALL schemas foreach ($candidates as $fieldName => $count) { if ($count === \count($schemas)) { - return (string) $fieldName; + return $fieldName; } }
PHP 8.5: src/JsonSchemaCodeGenerator.php#L241
Escaped Mutant for Mutator "FalseValue": @@ @@ /** @var array<string, mixed> $fieldSchema */ $fieldSchema = $properties[$fieldName]; - $isDiscriminator = false; + $isDiscriminator = true; if (\array_key_exists('const', $fieldSchema)) { $isDiscriminator = true;
PHP 8.5: src/JsonSchemaCodeGenerator.php#L230
Escaped Mutant for Mutator "LogicalAnd": @@ @@ : []; /** @var array<int, string> $required */ - $required = isset($schema['required']) && \is_array($schema['required']) + $required = isset($schema['required']) || \is_array($schema['required']) ? $schema['required'] : [];
PHP 8.5: src/JsonSchemaCodeGenerator.php#L225
Escaped Mutant for Mutator "LogicalAnd": @@ @@ foreach ($schemas as $schema) { /** @var array<string, array<string, mixed>> $properties */ - $properties = isset($schema['properties']) && \is_array($schema['properties']) + $properties = isset($schema['properties']) || \is_array($schema['properties']) ? $schema['properties'] : [];
PHP 8.5: src/JsonSchemaCodeGenerator.php#L215
Escaped Mutant for Mutator "ReturnRemoval": @@ @@ $type = $schema['type'] ?? null; if ('object' !== $type) { - return null; + } }
PHP 8.5: src/JsonSchemaCodeGenerator.php#L211
Escaped Mutant for Mutator "Foreach_": @@ @@ } // All schemas must be objects - foreach ($schemas as $schema) { + foreach ([] as $schema) { $type = $schema['type'] ?? null; - if ('object' !== $type) { return null; }
PHP 8.5: src/JsonSchemaCodeGenerator.php#L120
Escaped Mutant for Mutator "UnwrapArrayValues": @@ @@ $hasNull = \in_array(null, $values, true); /** @var array<int, mixed> $nonNullValues */ - $nonNullValues = array_values(array_filter($values, static fn (mixed $v): bool => null !== $v)); + $nonNullValues = array_filter($values, static fn (mixed $v): bool => null !== $v); if (0 === \count($nonNullValues)) { throw new \InvalidArgumentException('Enum must have at leas one non null value');
PHP 8.5: src/JsonSchemaCodeGenerator.php#L81
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation": @@ @@ return $this->generateMultiType($type, $schema); } - if (null !== $type && !\is_string($type)) { + if (!(null !== $type) && \is_string($type)) { throw new \InvalidArgumentException('Invalid type value in schema'); }
PHP 8.4: src/JsonSchemaCodeGenerator.php#L309
Escaped Mutant for Mutator "ArrayItemRemoval": @@ @@ /** @var array<string, mixed> $merged */ $merged = [ - 'type' => 'object', 'properties' => $mergedProperties, 'required' => array_values(array_unique($mergedRequired)), ];
PHP 8.4: src/JsonSchemaCodeGenerator.php#L295
Escaped Mutant for Mutator "LogicalAnd": @@ @@ $mergedRequired = []; foreach ($schemas as $subSchema) { - if (isset($subSchema['properties']) && \is_array($subSchema['properties'])) { + if (isset($subSchema['properties']) || \is_array($subSchema['properties'])) { /** @var array<string, array<string, mixed>> $props */ $props = $subSchema['properties']; $mergedProperties = array_merge($mergedProperties, $props);
PHP 8.4: src/JsonSchemaCodeGenerator.php#L262
Escaped Mutant for Mutator "CastString": @@ @@ // The discriminator field must appear in ALL schemas foreach ($candidates as $fieldName => $count) { if ($count === \count($schemas)) { - return (string) $fieldName; + return $fieldName; } }
PHP 8.4: src/JsonSchemaCodeGenerator.php#L241
Escaped Mutant for Mutator "FalseValue": @@ @@ /** @var array<string, mixed> $fieldSchema */ $fieldSchema = $properties[$fieldName]; - $isDiscriminator = false; + $isDiscriminator = true; if (\array_key_exists('const', $fieldSchema)) { $isDiscriminator = true;
PHP 8.4: src/JsonSchemaCodeGenerator.php#L230
Escaped Mutant for Mutator "LogicalAnd": @@ @@ : []; /** @var array<int, string> $required */ - $required = isset($schema['required']) && \is_array($schema['required']) + $required = isset($schema['required']) || \is_array($schema['required']) ? $schema['required'] : [];
PHP 8.4: src/JsonSchemaCodeGenerator.php#L225
Escaped Mutant for Mutator "LogicalAnd": @@ @@ foreach ($schemas as $schema) { /** @var array<string, array<string, mixed>> $properties */ - $properties = isset($schema['properties']) && \is_array($schema['properties']) + $properties = isset($schema['properties']) || \is_array($schema['properties']) ? $schema['properties'] : [];
PHP 8.4: src/JsonSchemaCodeGenerator.php#L215
Escaped Mutant for Mutator "ReturnRemoval": @@ @@ $type = $schema['type'] ?? null; if ('object' !== $type) { - return null; + } }
PHP 8.4: src/JsonSchemaCodeGenerator.php#L211
Escaped Mutant for Mutator "Foreach_": @@ @@ } // All schemas must be objects - foreach ($schemas as $schema) { + foreach ([] as $schema) { $type = $schema['type'] ?? null; - if ('object' !== $type) { return null; }
PHP 8.4: src/JsonSchemaCodeGenerator.php#L120
Escaped Mutant for Mutator "UnwrapArrayValues": @@ @@ $hasNull = \in_array(null, $values, true); /** @var array<int, mixed> $nonNullValues */ - $nonNullValues = array_values(array_filter($values, static fn (mixed $v): bool => null !== $v)); + $nonNullValues = array_filter($values, static fn (mixed $v): bool => null !== $v); if (0 === \count($nonNullValues)) { throw new \InvalidArgumentException('Enum must have at leas one non null value');
PHP 8.4: src/JsonSchemaCodeGenerator.php#L81
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation": @@ @@ return $this->generateMultiType($type, $schema); } - if (null !== $type && !\is_string($type)) { + if (!(null !== $type) && \is_string($type)) { throw new \InvalidArgumentException('Invalid type value in schema'); }
PHP 8.3: src/JsonSchemaCodeGenerator.php#L309
Escaped Mutant for Mutator "ArrayItemRemoval": @@ @@ /** @var array<string, mixed> $merged */ $merged = [ - 'type' => 'object', 'properties' => $mergedProperties, 'required' => array_values(array_unique($mergedRequired)), ];
PHP 8.3: src/JsonSchemaCodeGenerator.php#L295
Escaped Mutant for Mutator "LogicalAnd": @@ @@ $mergedRequired = []; foreach ($schemas as $subSchema) { - if (isset($subSchema['properties']) && \is_array($subSchema['properties'])) { + if (isset($subSchema['properties']) || \is_array($subSchema['properties'])) { /** @var array<string, array<string, mixed>> $props */ $props = $subSchema['properties']; $mergedProperties = array_merge($mergedProperties, $props);
PHP 8.3: src/JsonSchemaCodeGenerator.php#L262
Escaped Mutant for Mutator "CastString": @@ @@ // The discriminator field must appear in ALL schemas foreach ($candidates as $fieldName => $count) { if ($count === \count($schemas)) { - return (string) $fieldName; + return $fieldName; } }
PHP 8.3: src/JsonSchemaCodeGenerator.php#L241
Escaped Mutant for Mutator "FalseValue": @@ @@ /** @var array<string, mixed> $fieldSchema */ $fieldSchema = $properties[$fieldName]; - $isDiscriminator = false; + $isDiscriminator = true; if (\array_key_exists('const', $fieldSchema)) { $isDiscriminator = true;
PHP 8.3: src/JsonSchemaCodeGenerator.php#L230
Escaped Mutant for Mutator "LogicalAnd": @@ @@ : []; /** @var array<int, string> $required */ - $required = isset($schema['required']) && \is_array($schema['required']) + $required = isset($schema['required']) || \is_array($schema['required']) ? $schema['required'] : [];
PHP 8.3: src/JsonSchemaCodeGenerator.php#L225
Escaped Mutant for Mutator "LogicalAnd": @@ @@ foreach ($schemas as $schema) { /** @var array<string, array<string, mixed>> $properties */ - $properties = isset($schema['properties']) && \is_array($schema['properties']) + $properties = isset($schema['properties']) || \is_array($schema['properties']) ? $schema['properties'] : [];
PHP 8.3: src/JsonSchemaCodeGenerator.php#L215
Escaped Mutant for Mutator "ReturnRemoval": @@ @@ $type = $schema['type'] ?? null; if ('object' !== $type) { - return null; + } }
PHP 8.3: src/JsonSchemaCodeGenerator.php#L211
Escaped Mutant for Mutator "Foreach_": @@ @@ } // All schemas must be objects - foreach ($schemas as $schema) { + foreach ([] as $schema) { $type = $schema['type'] ?? null; - if ('object' !== $type) { return null; }
PHP 8.3: src/JsonSchemaCodeGenerator.php#L120
Escaped Mutant for Mutator "UnwrapArrayValues": @@ @@ $hasNull = \in_array(null, $values, true); /** @var array<int, mixed> $nonNullValues */ - $nonNullValues = array_values(array_filter($values, static fn (mixed $v): bool => null !== $v)); + $nonNullValues = array_filter($values, static fn (mixed $v): bool => null !== $v); if (0 === \count($nonNullValues)) { throw new \InvalidArgumentException('Enum must have at leas one non null value');
PHP 8.3: src/JsonSchemaCodeGenerator.php#L81
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation": @@ @@ return $this->generateMultiType($type, $schema); } - if (null !== $type && !\is_string($type)) { + if (!(null !== $type) && \is_string($type)) { throw new \InvalidArgumentException('Invalid type value in schema'); }