Skip to content

Merge pull request #53 from Spomky-Labs/temp-489da8 #2

Merge pull request #53 from Spomky-Labs/temp-489da8

Merge pull request #53 from Spomky-Labs/temp-489da8 #2

Triggered via push March 30, 2024 16:38
Status Success
Total duration 9m 56s
Artifacts

infection.yml

on: push
5️⃣ Mutation Testing
9m 47s
5️⃣ Mutation Testing
Fit to window
Zoom out
Zoom in

Annotations

11 warnings
5️⃣ Mutation Testing
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
5️⃣ Mutation Testing: src/ASN1/Component/Identifier.php#L100
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ $byte = ord($data[$idx++]); // bits 8 and 7 (class) // 0 = universal, 1 = application, 2 = context-specific, 3 = private - $class = (0b11000000 & $byte) >> 6; + $class = (193 & $byte) >> 6; // bit 6 (0 = primitive / 1 = constructed) $pc = (0b100000 & $byte) >> 5; // bits 5 to 1 (tag number)
5️⃣ Mutation Testing: src/ASN1/Component/Identifier.php#L102
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ // 0 = universal, 1 = application, 2 = context-specific, 3 = private $class = (0b11000000 & $byte) >> 6; // bit 6 (0 = primitive / 1 = constructed) - $pc = (0b100000 & $byte) >> 5; + $pc = (33 & $byte) >> 5; // bits 5 to 1 (tag number) $tag = 0b11111 & $byte; // long-form identifier
5️⃣ Mutation Testing: src/ASN1/Component/Identifier.php#L120
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ $bytes = []; $byte = $this->_class << 6 | $this->_pc << 5; $tag = $this->_tag->getValue(); - if ($tag->isLessThan(0x1f)) { + if ($tag->isLessThan(30)) { $bytes[] = $byte | $tag->toInt(); } else { $bytes[] = $byte | 0x1f;
5️⃣ Mutation Testing: src/ASN1/Component/Identifier.php#L120
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ $bytes = []; $byte = $this->_class << 6 | $this->_pc << 5; $tag = $this->_tag->getValue(); - if ($tag->isLessThan(0x1f)) { + if ($tag->isLessThan(32)) { $bytes[] = $byte | $tag->toInt(); } else { $bytes[] = $byte | 0x1f;
5️⃣ Mutation Testing: src/ASN1/Component/Identifier.php#L127
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ $bytes[] = $byte | 0x1f; $octets = []; for (; $tag->isGreaterThan(0); $tag = $tag->shiftedRight(7)) { - $octets[] = 0x80 | $tag->and(0x7f)->toInt(); + $octets[] = 129 | $tag->and(0x7f)->toInt(); } // last octet has bit 8 set to zero $octets[0] &= 0x7f;
5️⃣ Mutation Testing: src/ASN1/Component/Identifier.php#L130
Escaped Mutant for Mutator "Assignment": --- Original +++ New @@ @@ $octets[] = 0x80 | $tag->and(0x7f)->toInt(); } // last octet has bit 8 set to zero - $octets[0] &= 0x7f; + $octets[0] = 0x7f; foreach (array_reverse($octets) as $octet) { $bytes[] = $octet; }
5️⃣ Mutation Testing: src/ASN1/Component/Identifier.php#L224
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ public function withClass(int $class): self { - $obj = clone $this; + $obj = $this; $obj->_class = 0b11 & $class; return $obj; }
5️⃣ Mutation Testing: src/ASN1/Component/Identifier.php#L225
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ public function withClass(int $class): self { $obj = clone $this; - $obj->_class = 0b11 & $class; + $obj->_class = 2 & $class; return $obj; } /**
5️⃣ Mutation Testing: src/ASN1/Component/Identifier.php#L225
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ public function withClass(int $class): self { $obj = clone $this; - $obj->_class = 0b11 & $class; + $obj->_class = 4 & $class; return $obj; } /**
5️⃣ Mutation Testing: src/ASN1/Component/Identifier.php#L236
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ */ public function withTag(int $tag): self { - $obj = clone $this; + $obj = $this; $obj->_tag = BigInt::create($tag); return $obj; }