Skip to content

Fixing coverage config (#205) #57

Fixing coverage config (#205)

Fixing coverage config (#205) #57

Triggered via push December 3, 2023 10:23
Status Success
Total duration 15m 24s
Artifacts 1

ci.yaml

on: push
Matrix: Code quality assurance
Matrix: Code static analysis
Matrix: Code linting
Matrix: Test for mutants
Matrix: Code tests
Matrix: Code tests with code coverage
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
Test for mutants (8.2, ubuntu-latest): src/API/Crypto.php#L60
Escaped Mutant for Mutator "CastArray": --- Original +++ New @@ @@ { try { // Start with 12 random bytes - $message = pack('C*', ...(array) unpack('C*', random_bytes(12))); + $message = pack('C*', ...unpack('C*', random_bytes(12))); } catch (Throwable $ex) { throw new Exceptions\Encrypt('Preparing payload header failed', $ex->getCode(), $ex); }
Test for mutants (8.2, ubuntu-latest): src/API/Crypto.php#L81
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ $message = $message . str_repeat(chr(0), 16 - strlen($message) % 16); // Encrypt the payload $cipherText = openssl_encrypt($message, 'AES-128-CBC', $key, OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING, $iv); - if ($cipherText === false) { + if ($cipherText === true) { throw new Exceptions\Encrypt('Payload could not be encrypted'); } // Compute HMAC-SHA-256
Test for mutants (8.2, ubuntu-latest): src/API/Crypto.php#L99
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ public static function decryptPayload(string $data, string $key, string $iv, string $hmacKey) : string { $decodedWithSignature = base64_decode($data, true); - if ($decodedWithSignature === false) { + if ($decodedWithSignature === true) { throw new Exceptions\Decrypt('Payload could not be decoded'); } $decoded = substr($decodedWithSignature, 0, -self::SIGNATURE_BYTES_LENGTH);
Test for mutants (8.2, ubuntu-latest): src/API/Crypto.php#L120
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ throw new Exceptions\Decrypt('Payload could not be decrypted. Signatures are different'); } $result = openssl_decrypt($decoded, 'AES-128-CBC', $key, OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING, $iv); - if ($result === false) { + if ($result === true) { throw new Exceptions\Decrypt('Payload could not be decrypted'); } $decrypted = unpack('C*', $result);
Test for mutants (8.2, ubuntu-latest): src/API/Crypto.php#L126
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ throw new Exceptions\Decrypt('Payload could not be decrypted'); } $decrypted = unpack('C*', $result); - if ($decrypted === false) { + if ($decrypted === true) { throw new Exceptions\Decrypt('Payload could not be decrypted'); } $decrypted = array_values($decrypted);
Test for mutants (8.2, ubuntu-latest): src/API/Crypto.php#L135
Escaped Mutant for Mutator "LessThan": --- Original +++ New @@ @@ $decrypted = array_values($decrypted); $message = []; // The valid decrypted data starts at byte offset 16 - for ($i = 16; $i < count($decrypted); $i++) { + for ($i = 16; $i <= count($decrypted); $i++) { // Strip ending if ($decrypted[$i] === 0) { break;
Test for mutants (8.2, ubuntu-latest): src/API/Crypto.php#L138
Escaped Mutant for Mutator "Break_": --- Original +++ New @@ @@ for ($i = 16; $i < count($decrypted); $i++) { // Strip ending if ($decrypted[$i] === 0) { - break; + continue; } $message[] = $decrypted[$i]; }
Test for mutants (8.2, ubuntu-latest): src/Commands/Devices.php#L97
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ private string|null $challengeKey = null; public function __construct(private readonly API\TelevisionApiFactory $televisionApiFactory, private readonly Viera\Logger $logger, private readonly DevicesModels\Entities\Connectors\ConnectorsRepository $connectorsRepository, private readonly DevicesModels\Entities\Devices\DevicesRepository $devicesRepository, private readonly DevicesModels\Entities\Devices\DevicesManager $devicesManager, private readonly DevicesModels\Entities\Devices\Properties\PropertiesRepository $devicesPropertiesRepository, private readonly DevicesModels\Entities\Devices\Properties\PropertiesManager $devicesPropertiesManager, private readonly DevicesModels\Entities\Channels\ChannelsRepository $channelsRepository, private readonly DevicesModels\Entities\Channels\ChannelsManager $channelsManager, private readonly DevicesModels\Entities\Channels\Properties\PropertiesRepository $channelsPropertiesRepository, private readonly DevicesModels\Entities\Channels\Properties\PropertiesManager $channelsPropertiesManager, private readonly Persistence\ManagerRegistry $managerRegistry, private readonly DateTimeFactory\Factory $dateTimeFactory, private readonly Localization\Translator $translator, string|null $name = null) { - parent::__construct($name); + } /** * @throws Console\Exception\InvalidArgumentException
Test for mutants (8.2, ubuntu-latest): src/Commands/Devices.php#L105
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ */ protected function configure() : void { - $this->setName(self::NAME)->setDescription('Viera connector televisions management'); + } /** * @throws Console\Exception\InvalidArgumentException
Test for mutants (8.2, ubuntu-latest): src/Commands/Discovery.php#L84
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ private DateTimeInterface|null $executedTime = null; public function __construct(private readonly Api\TelevisionApiFactory $televisionApiFactory, private readonly Viera\Logger $logger, private readonly DevicesModels\Entities\Connectors\ConnectorsRepository $connectorsRepository, private readonly DevicesModels\Entities\Devices\DevicesRepository $devicesRepository, private readonly DevicesModels\Entities\Devices\Properties\PropertiesRepository $devicesPropertiesRepository, private readonly DevicesModels\Entities\Devices\Properties\PropertiesManager $devicesPropertiesManager, private readonly DateTimeFactory\Factory $dateTimeFactory, private readonly Localization\Translator $translator, string|null $name = null) { - parent::__construct($name); + } /** * @throws Console\Exception\InvalidArgumentException

Artifacts

Produced during runtime
Name Size
Logs - Mutations Expired
3 MB