Skip to content

Update tools

Update tools #1336

Triggered via pull request December 3, 2023 14:22
Status Success
Total duration 4m 9s
Artifacts

continuous-integration.yml

on: pull_request
run  /  Generate test matrix
4s
run / Generate test matrix
Matrix: run / Code Coverage
Matrix: run / Coding Standards
Matrix: run / Lint composer.json
Matrix: run / Lint symfony container
Matrix: run / Mutation Tests
Matrix: run / Static Code Analysis
Matrix: run / Lint twig files
Matrix: run / Lint XLIFF files
Matrix: run / Lint YML files
Matrix: run / tests
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
run / Mutation Tests (8.3): src/Builder/TrackBuilder.php#L57
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ } public function withChosenByUser(bool $choosenByUser) : self { - $this->data['chosenByUser'] = $choosenByUser ? 1 : 0; + $this->data['chosenByUser'] = $choosenByUser ? 1 : -1; return $this; } public function withTrackNumber(int $trackNumber) : self
run / Mutation Tests (8.3): src/Builder/TrackBuilder.php#L57
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ } public function withChosenByUser(bool $choosenByUser) : self { - $this->data['chosenByUser'] = $choosenByUser ? 1 : 0; + $this->data['chosenByUser'] = $choosenByUser ? 1 : 1; return $this; } public function withTrackNumber(int $trackNumber) : self
run / Mutation Tests (8.3): src/Model/Artist.php#L69
Escaped Mutant for Mutator "Coalesce": --- Original +++ New @@ @@ public static function fromApi(array $data) : self { $images = self::createImagesFromApi($data); - return new self($data['name'] ?? $data['#text'], $data['mbid'] ?? null, $images, $data['url'] ?? null); + return new self($data['#text'] ?? $data['name'], $data['mbid'] ?? null, $images, $data['url'] ?? null); } private static function createImagesFromApi(array $data) : array {
run / Mutation Tests (8.3): src/Model/Artist.php#L81
Escaped Mutant for Mutator "CastArray": --- Original +++ New @@ @@ { $images = []; if (\array_key_exists('image', $data)) { - foreach ((array) $data['image'] as $image) { + foreach ($data['image'] as $image) { $images[] = new Image($image['#text']); } }
run / Mutation Tests (8.3): src/Model/Artist.php#L81
Escaped Mutant for Mutator "Foreach_": --- Original +++ New @@ @@ { $images = []; if (\array_key_exists('image', $data)) { - foreach ((array) $data['image'] as $image) { + foreach (array() as $image) { $images[] = new Image($image['#text']); } }
run / Mutation Tests (8.3): src/Model/Artist.php#L86
Escaped Mutant for Mutator "ArrayOneItem": --- Original +++ New @@ @@ $images[] = new Image($image['#text']); } } - return $images; + return count($images) > 1 ? array_slice($images, 0, 1, true) : $images; } }
run / Mutation Tests (8.3): src/Model/ArtistInfo.php#L130
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ { $images = self::createImagesFromApi($data); $tags = self::createTagsFromApi($data); - return new self($data['name'], $data['mbid'] ?? null, $images, $data['url'] ?? null, isset($data['playcount']) ? (int) $data['playcount'] : 0, $data['bio']['summary'] ?? null, $data['bio']['content'] ?? null, isset($data['tagcount']) ? (int) $data['tagcount'] : 0, $tags); + return new self($data['name'], $data['mbid'] ?? null, $images, $data['url'] ?? null, isset($data['playcount']) ? (int) $data['playcount'] : -1, $data['bio']['summary'] ?? null, $data['bio']['content'] ?? null, isset($data['tagcount']) ? (int) $data['tagcount'] : 0, $tags); } private static function createImagesFromApi(array $data) : array {
run / Mutation Tests (8.3): src/Model/ArtistInfo.php#L130
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ { $images = self::createImagesFromApi($data); $tags = self::createTagsFromApi($data); - return new self($data['name'], $data['mbid'] ?? null, $images, $data['url'] ?? null, isset($data['playcount']) ? (int) $data['playcount'] : 0, $data['bio']['summary'] ?? null, $data['bio']['content'] ?? null, isset($data['tagcount']) ? (int) $data['tagcount'] : 0, $tags); + return new self($data['name'], $data['mbid'] ?? null, $images, $data['url'] ?? null, isset($data['playcount']) ? (int) $data['playcount'] : 1, $data['bio']['summary'] ?? null, $data['bio']['content'] ?? null, isset($data['tagcount']) ? (int) $data['tagcount'] : 0, $tags); } private static function createImagesFromApi(array $data) : array {
run / Mutation Tests (8.3): src/Model/ArtistInfo.php#L130
Escaped Mutant for Mutator "Ternary": --- Original +++ New @@ @@ { $images = self::createImagesFromApi($data); $tags = self::createTagsFromApi($data); - return new self($data['name'], $data['mbid'] ?? null, $images, $data['url'] ?? null, isset($data['playcount']) ? (int) $data['playcount'] : 0, $data['bio']['summary'] ?? null, $data['bio']['content'] ?? null, isset($data['tagcount']) ? (int) $data['tagcount'] : 0, $tags); + return new self($data['name'], $data['mbid'] ?? null, $images, $data['url'] ?? null, isset($data['playcount']) ? 0 : (int) $data['playcount'], $data['bio']['summary'] ?? null, $data['bio']['content'] ?? null, isset($data['tagcount']) ? (int) $data['tagcount'] : 0, $tags); } private static function createImagesFromApi(array $data) : array {
run / Mutation Tests (8.3): src/Model/ArtistInfo.php#L133
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ { $images = self::createImagesFromApi($data); $tags = self::createTagsFromApi($data); - return new self($data['name'], $data['mbid'] ?? null, $images, $data['url'] ?? null, isset($data['playcount']) ? (int) $data['playcount'] : 0, $data['bio']['summary'] ?? null, $data['bio']['content'] ?? null, isset($data['tagcount']) ? (int) $data['tagcount'] : 0, $tags); + return new self($data['name'], $data['mbid'] ?? null, $images, $data['url'] ?? null, isset($data['playcount']) ? (int) $data['playcount'] : 0, $data['bio']['summary'] ?? null, $data['bio']['content'] ?? null, isset($data['tagcount']) ? (int) $data['tagcount'] : -1, $tags); } private static function createImagesFromApi(array $data) : array {