Skip to content

build

build #211

Triggered via schedule December 15, 2024 16:17
Status Failure
Total duration 30s
Artifacts

build.yml

on: schedule
Code Style (phpcs)
9s
Code Style (phpcs)
Code Style (php-cs-fixer)
9s
Code Style (php-cs-fixer)
Code analysis (phpstan)
14s
Code analysis (phpstan)
Check src/UnboundedOccursPaths.json file
14s
Check src/UnboundedOccursPaths.json file
Mutation testing analysis (infection)
23s
Mutation testing analysis (infection)
Matrix: tests
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 21 warnings
Code analysis (phpstan): src/Factory.php#L72
Parameter #1 ...$paths of class PhpCfdi\CfdiToJson\UnboundedOccursPaths constructor expects string, mixed given.
Code analysis (phpstan): src/Nodes/Node.php#L62
Method PhpCfdi\CfdiToJson\Nodes\Node::toArray() should return array<string, array|string> but returns array.
Code analysis (phpstan): tests/Functional/ConverterTest.php#L40
Cannot access offset 'Concepto' on mixed.
Code analysis (phpstan): tests/Functional/ConverterTest.php#L41
Parameter #2 $haystack of method PHPUnit\Framework\Assert::assertCount() expects Countable|iterable, mixed given.
Code analysis (phpstan): tests/Functional/ConverterTest.php#L43
Cannot access offset 0 on mixed.
Code analysis (phpstan): tests/Functional/ConverterTest.php#L44
Cannot access offset 'Descripcion' on mixed.
Code analysis (phpstan): tests/Functional/ConverterTest.php#L46
Cannot access offset 1 on mixed.
Code analysis (phpstan): tests/Functional/ConverterTest.php#L47
Cannot access offset 'Descripcion' on mixed.
Code analysis (phpstan): tests/Functional/ConverterTest.php#L52
Cannot access offset 'Traslado' on mixed.
Code analysis (phpstan): tests/Functional/ConverterTest.php#L52
Cannot access offset 'Traslados' on mixed.
Code Style (php-cs-fixer)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Tests on PHP 8.0 (phpunit)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Code Style (phpcs)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Tests on PHP 8.3 (phpunit)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Tests on PHP 7.4 (phpunit)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Check src/UnboundedOccursPaths.json file
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Tests on PHP 8.1 (phpunit)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Code analysis (phpstan)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Tests on PHP 7.3 (phpunit)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Tests on PHP 8.2 (phpunit)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Mutation testing analysis (infection)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Mutation testing analysis (infection): src/CfdiToDataNode.php#L94
Escaped Mutant for Mutator "Break_": @@ @@ $parentsStack = []; for ($current = $element; null !== $current; $current = $current->parentNode) { if ($namespace !== $current->namespaceURI) { - break; + continue; } $parentsStack[] = $current->localName; }
Mutation testing analysis (infection): src/CfdiToDataNode.php#L108
Escaped Mutant for Mutator "Continue_": @@ @@ $values = []; foreach ($element->childNodes as $childElement) { if (!$childElement instanceof DOMText) { - continue; + break; } $values[] = $childElement->wholeText; }
Mutation testing analysis (infection): src/CfdiToDataNode.php#L112
Escaped Mutant for Mutator "CastString": @@ @@ } $values[] = $childElement->wholeText; } - return (string) preg_replace(['/\s+/', '/^ +/', '/ +$/'], [' ', '', ''], implode('', $values)); + return preg_replace(['/\s+/', '/^ +/', '/ +$/'], [' ', '', ''], implode('', $values)); } }
Mutation testing analysis (infection): src/Factory.php#L46
Escaped Mutant for Mutator "Catch_": @@ @@ } try { $unboundedOccursPaths = $this->createUnboundedOccursPathsUsingJsonSource($contents); - } catch (JsonException|LogicException $exception) { + } catch (JsonException $exception) { throw new LogicException("The file {$sourceFile} has invalid contents", 0, $exception); } return $unboundedOccursPaths;
Mutation testing analysis (infection): src/Factory.php#L47
Escaped Mutant for Mutator "DecrementInteger": @@ @@ try { $unboundedOccursPaths = $this->createUnboundedOccursPathsUsingJsonSource($contents); } catch (JsonException|LogicException $exception) { - throw new LogicException("The file {$sourceFile} has invalid contents", 0, $exception); + throw new LogicException("The file {$sourceFile} has invalid contents", -1, $exception); } return $unboundedOccursPaths; }
Mutation testing analysis (infection): src/Factory.php#L47
Escaped Mutant for Mutator "IncrementInteger": @@ @@ try { $unboundedOccursPaths = $this->createUnboundedOccursPathsUsingJsonSource($contents); } catch (JsonException|LogicException $exception) { - throw new LogicException("The file {$sourceFile} has invalid contents", 0, $exception); + throw new LogicException("The file {$sourceFile} has invalid contents", 1, $exception); } return $unboundedOccursPaths; }
Mutation testing analysis (infection): src/Factory.php#L60
Escaped Mutant for Mutator "DecrementInteger": @@ @@ */ public function createUnboundedOccursPathsUsingJsonSource(string $contents): UnboundedOccursPaths { - $sourcePaths = json_decode($contents, true, 512, JSON_THROW_ON_ERROR); + $sourcePaths = json_decode($contents, true, 511, JSON_THROW_ON_ERROR); if (!is_array($sourcePaths)) { throw new LogicException('JSON does not contains an array of entries'); }
Mutation testing analysis (infection): src/Factory.php#L60
Escaped Mutant for Mutator "IncrementInteger": @@ @@ */ public function createUnboundedOccursPathsUsingJsonSource(string $contents): UnboundedOccursPaths { - $sourcePaths = json_decode($contents, true, 512, JSON_THROW_ON_ERROR); + $sourcePaths = json_decode($contents, true, 513, JSON_THROW_ON_ERROR); if (!is_array($sourcePaths)) { throw new LogicException('JSON does not contains an array of entries'); }
Mutation testing analysis (infection): src/Nodes/Node.php#L50
Escaped Mutant for Mutator "PublicVisibility": @@ @@ { return $this->path; } - public function getValue(): string + protected function getValue(): string { return $this->value; }
Mutation testing analysis (infection): src/XsdMaxOccurs/Finder.php#L46
Escaped Mutant for Mutator "InstanceOf_": @@ @@ $xpath->registerNamespace('x', self::NS_XMLSCHEMA); $nodes = $xpath->query($query) ?: new DOMNodeList(); foreach ($nodes as $node) { - if ($node instanceof DOMElement) { + if (true) { $paths[] = $this->obtainPathForElement($node); } }