Make fields available from Contact entity #23
This run and associated checks have been archived and are scheduled for deletion.
Learn more about checks retention
Annotations
10 warnings
PHP 8.2:
src/Builder/ContactBuilder.php#L35
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
private ?FieldCollection $fields = null;
public function __construct()
{
- $this->reset();
+
}
public function reset() : self
{
|
PHP 8.2:
src/Builder/ContactBuilder.php#L38
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
{
$this->reset();
}
- public function reset() : self
+ protected function reset() : self
{
$this->id = null;
$this->owner = null;
|
PHP 8.2:
src/Builder/ContactBuilder.php#L42
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
{
$this->id = null;
$this->owner = null;
- $this->isPublished = true;
+ $this->isPublished = false;
$this->points = 0;
$this->dateAdded = null;
$this->dateIdentified = null;
|
PHP 8.2:
src/Builder/ContactBuilder.php#L43
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
$this->id = null;
$this->owner = null;
$this->isPublished = true;
- $this->points = 0;
+ $this->points = -1;
$this->dateAdded = null;
$this->dateIdentified = null;
$this->dateModified = null;
|
PHP 8.2:
src/Builder/ContactBuilder.php#L104
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
public function build() : Contact
{
$result = new Contact(dateAdded: $this->dateAdded ?? throw new InvalidArgumentException('Missing dateAdded'), dateIdentified: $this->dateIdentified ?? throw new InvalidArgumentException('Missing dateIdentified'), dateModified: $this->dateModified, id: $this->id ?? throw new InvalidArgumentException('Missing id'), isPublished: $this->isPublished, owner: $this->owner, points: $this->points, fields: $this->fields ?? new FieldCollection([]));
- $this->reset();
+
return $result;
}
}
|
PHP 8.2:
src/Builder/UserBuilder.php#L25
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
private ?string $username = null;
public function __construct()
{
- $this->reset();
+
}
public function reset() : self
{
|
PHP 8.2:
src/Builder/UserBuilder.php#L28
Escaped Mutant for Mutator "PublicVisibility":
--- Original
+++ New
@@ @@
{
$this->reset();
}
- public function reset() : self
+ protected function reset() : self
{
$this->id = null;
$this->firstName = null;
|
PHP 8.2:
src/Builder/UserBuilder.php#L64
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
public function build() : User
{
$user = new User(id: $this->id ?? throw new InvalidArgumentException('Missing id'), firstName: $this->firstName, lastName: $this->lastName, username: $this->username ?? throw new InvalidArgumentException('Missing username'));
- $this->reset();
+
return $user;
}
}
|
PHP 8.2:
src/Factory/ContactFactory.php#L28
Escaped Mutant for Mutator "Coalesce":
--- Original
+++ New
@@ @@
private FieldCollectionFactory $fieldsFactory;
public function __construct(?UserFactory $userFactory = null, ?FieldCollectionFactory $fieldsFactory = null)
{
- $this->userFactory = $userFactory ?? new UserFactory();
+ $this->userFactory = new UserFactory() ?? $userFactory;
$this->fieldsFactory = $fieldsFactory ?? new FieldCollectionFactory();
}
/**
|
PHP 8.2:
src/Factory/ContactFactory.php#L29
Escaped Mutant for Mutator "Coalesce":
--- Original
+++ New
@@ @@
public function __construct(?UserFactory $userFactory = null, ?FieldCollectionFactory $fieldsFactory = null)
{
$this->userFactory = $userFactory ?? new UserFactory();
- $this->fieldsFactory = $fieldsFactory ?? new FieldCollectionFactory();
+ $this->fieldsFactory = new FieldCollectionFactory() ?? $fieldsFactory;
}
/**
* @param array<string, mixed> $payload
|