Skip to content

Merge pull request #32 from eclipxe13/maintenance-20240122 #3

Merge pull request #32 from eclipxe13/maintenance-20240122

Merge pull request #32 from eclipxe13/maintenance-20240122 #3

Triggered via push January 22, 2024 16:35
Status Success
Total duration 1m 30s
Artifacts 1

coverage.yml

on: push
Tests on PHP 8.3 (code coverage)
23s
Tests on PHP 8.3 (code coverage)
SonarCloud check secrets are present
0s
SonarCloud check secrets are present
Mutation testing analysis
27s
Mutation testing analysis
SonarCloud Scan and Report
48s
SonarCloud Scan and Report
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
Mutation testing analysis: src/Credentials.php#L104
Escaped Mutant for Mutator "ProtectedVisibility": --- Original +++ New @@ @@ throw new CannotLoadCertificateAndPrivateKey($this->certificate(), $this->privateKey(), $this->passPhrase(), $exception); } } - protected function getCsd() : Credential + private function getCsd() : Credential { if (null === $this->csd) { $credential = $this->makePhpCfdiCredential();
Mutation testing analysis: src/Credentials.php#L118
Escaped Mutant for Mutator "ProtectedVisibility": --- Original +++ New @@ @@ * @param Credential $credential * @throws CertificateIsNotCSD */ - protected function setCsd(Credential $credential) : void + private function setCsd(Credential $credential) : void { if (!$credential->isCsd()) { throw new CertificateIsNotCSD($credential->certificate()->serialNumber()->bytes());
Mutation testing analysis: src/Exceptions/CannotLoadCertificateAndPrivateKey.php#L22
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ private $passPhrase; public function __construct(string $certificate, string $privateKey, string $passPhrase, Throwable $previous) { - parent::__construct('Cannot load certificate and private key', 0, $previous); + parent::__construct('Cannot load certificate and private key', -1, $previous); $this->certificateFile = $certificate; $this->privateKeyFile = $privateKey; $this->passPhrase = $passPhrase;
Mutation testing analysis: src/Exceptions/CannotLoadCertificateAndPrivateKey.php#L22
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ private $passPhrase; public function __construct(string $certificate, string $privateKey, string $passPhrase, Throwable $previous) { - parent::__construct('Cannot load certificate and private key', 0, $previous); + parent::__construct('Cannot load certificate and private key', 1, $previous); $this->certificateFile = $certificate; $this->privateKeyFile = $privateKey; $this->passPhrase = $passPhrase;
Mutation testing analysis: src/Signers/CreateKeyInfoElementTrait.php#L20
Escaped Mutant for Mutator "ProtectedVisibility": --- Original +++ New @@ @@ * @param array<mixed> $pubKeyData * @return DOMElement */ - protected function createKeyInfoElement(DOMDocument $document, string $issuerName, string $serialNumber, string $pemContents, array $pubKeyData) : DOMElement + private function createKeyInfoElement(DOMDocument $document, string $issuerName, string $serialNumber, string $pemContents, array $pubKeyData) : DOMElement { $x509Data = $document->createElement('X509Data'); $x509IssuerSerial = $document->createElement('X509IssuerSerial');
Mutation testing analysis: src/Signers/DOMSigner.php#L100
Escaped Mutant for Mutator "ProtectedVisibility": --- Original +++ New @@ @@ $keyInfoElement = $this->createKeyInfoElement($document, $credentials->certificateIssuerName(), $credentials->serialNumber(), $credentials->certificateAsPEM(), $credentials->publicKeyData()); $signature->appendChild($document->importNode($keyInfoElement, self::IMPORT_NODE_DEEP)); } - protected function createSignedInfoElement() : DOMElement + private function createSignedInfoElement() : DOMElement { $template = '<SignedInfo> <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
Mutation testing analysis: src/Signers/SignCapsuleMethodTrait.php#L20
Escaped Mutant for Mutator "CastString": --- Original +++ New @@ @@ } $document = $capsule->exportToDocument(); $this->signDocument($document, $credentials); - return (string) $document->saveXML(); + return $document->saveXML(); } }
Mutation testing analysis: src/Signers/XmlSecLibsSigner.php#L30
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ // move XmlSecLibs signature to internal method $sigNode = $this->signDocumentInternal($document, $credentials); } catch (Exception $xmlSecLibsException) { - throw new LogicException('Cannot create signature using XmlSecLibs', 0, $xmlSecLibsException); + throw new LogicException('Cannot create signature using XmlSecLibs', -1, $xmlSecLibsException); } // create the KeyInfo element using own procedure // the procedure from XMLSecLibs does not include correct format of issuer name,
Mutation testing analysis: src/Signers/XmlSecLibsSigner.php#L30
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ // move XmlSecLibs signature to internal method $sigNode = $this->signDocumentInternal($document, $credentials); } catch (Exception $xmlSecLibsException) { - throw new LogicException('Cannot create signature using XmlSecLibs', 0, $xmlSecLibsException); + throw new LogicException('Cannot create signature using XmlSecLibs', 1, $xmlSecLibsException); } // create the KeyInfo element using own procedure // the procedure from XMLSecLibs does not include correct format of issuer name,
Mutation testing analysis: src/XmlCancelacionHelper.php#L77
Escaped Mutant for Mutator "PublicVisibility": --- Original +++ New @@ @@ $credentials = new Credentials($certificateFile, $privateKeyFile, $passPhrase); return $this->setCredentials($credentials); } - public function createDateTime(?DateTimeImmutable $dateTime) : DateTimeImmutable + protected function createDateTime(?DateTimeImmutable $dateTime) : DateTimeImmutable { if (null === $dateTime) { return new DateTimeImmutable();

Artifacts

Produced during runtime
Name Size
code-coverage Expired
768 KB