Continuous Integration #1342
Annotations
11 warnings
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Run mutation tests with pcov and infection/infection:
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 with pcov and infection/infection:
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 with pcov and infection/infection:
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 with pcov and infection/infection:
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 with pcov and infection/infection:
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 with pcov and infection/infection:
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 with pcov and infection/infection:
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 with pcov and infection/infection:
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 with pcov and infection/infection:
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 with pcov and infection/infection:
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
{
|
Loading