Automation #1427
Annotations
10 warnings
src/Value/Did.php#L20
Escaped Mutant for Mutator "PregMatchRemoveCaret":
@@ @@
{
// should we split the value into parts and validate each part?
// and store the parts in the object
- if (\preg_match('#^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === 0 || \preg_match('#^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === false) {
+ if (\preg_match('#did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === 0 || \preg_match('#^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === false) {
// Todo: create custom exception
throw new InvalidArgumentException('Invalid DID: ' . $this->did);
}
|
src/Value/Did.php#L20
Escaped Mutant for Mutator "PregMatchRemoveCaret":
@@ @@
{
// should we split the value into parts and validate each part?
// and store the parts in the object
- if (\preg_match('#^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === 0 || \preg_match('#^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === false) {
+ if (\preg_match('#^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === 0 || \preg_match('#did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === false) {
// Todo: create custom exception
throw new InvalidArgumentException('Invalid DID: ' . $this->did);
}
|
src/Value/Did.php#L20
Escaped Mutant for Mutator "PregMatchRemoveDollar":
@@ @@
{
// should we split the value into parts and validate each part?
// and store the parts in the object
- if (\preg_match('#^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === 0 || \preg_match('#^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === false) {
+ if (\preg_match('#^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === 0 || \preg_match('#^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]#', $this->did) === false) {
// Todo: create custom exception
throw new InvalidArgumentException('Invalid DID: ' . $this->did);
}
|
src/Value/Did.php#L23
Escaped Mutant for Mutator "FalseValue":
@@ @@
{
// should we split the value into parts and validate each part?
// and store the parts in the object
- if (\preg_match('#^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === 0 || \preg_match('#^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === false) {
+ if (\preg_match('#^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === 0 || \preg_match('#^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === true) {
// Todo: create custom exception
throw new InvalidArgumentException('Invalid DID: ' . $this->did);
}
|
src/Value/Did.php#L26
Escaped Mutant for Mutator "ConcatOperandRemoval":
@@ @@
// and store the parts in the object
if (\preg_match('#^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === 0 || \preg_match('#^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === false) {
// Todo: create custom exception
- throw new InvalidArgumentException('Invalid DID: ' . $this->did);
+ throw new InvalidArgumentException('Invalid DID: ');
}
}
#[Override]
|
src/Value/Did.php#L26
Escaped Mutant for Mutator "Concat":
@@ @@
// and store the parts in the object
if (\preg_match('#^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === 0 || \preg_match('#^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === false) {
// Todo: create custom exception
- throw new InvalidArgumentException('Invalid DID: ' . $this->did);
+ throw new InvalidArgumentException($this->did . 'Invalid DID: ');
}
}
#[Override]
|
src/Value/Did.php#L26
Escaped Mutant for Mutator "ConcatOperandRemoval":
@@ @@
// and store the parts in the object
if (\preg_match('#^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === 0 || \preg_match('#^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$#', $this->did) === false) {
// Todo: create custom exception
- throw new InvalidArgumentException('Invalid DID: ' . $this->did);
+ throw new InvalidArgumentException($this->did);
}
}
#[Override]
|
src/Value/Handle.php#L20
Escaped Mutant for Mutator "PregMatchRemoveCaret":
@@ @@
{
public function __construct(private string $handle)
{
- if (\preg_match('#^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$#', $this->handle) === 0 || \preg_match('#^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$#', $this->handle) === false) {
+ if (\preg_match('#^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$#', $this->handle) === 0 || \preg_match('#([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$#', $this->handle) === false) {
throw new InvalidArgumentException('Invalid handle: ' . $this->handle);
}
}
|
src/Value/Handle.php#L20
Escaped Mutant for Mutator "PregMatchRemoveDollar":
@@ @@
{
public function __construct(private string $handle)
{
- if (\preg_match('#^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$#', $this->handle) === 0 || \preg_match('#^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$#', $this->handle) === false) {
+ if (\preg_match('#^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$#', $this->handle) === 0 || \preg_match('#^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?#', $this->handle) === false) {
throw new InvalidArgumentException('Invalid handle: ' . $this->handle);
}
}
|
src/Value/Handle.php#L23
Escaped Mutant for Mutator "FalseValue":
@@ @@
{
public function __construct(private string $handle)
{
- if (\preg_match('#^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$#', $this->handle) === 0 || \preg_match('#^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$#', $this->handle) === false) {
+ if (\preg_match('#^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$#', $this->handle) === 0 || \preg_match('#^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$#', $this->handle) === true) {
throw new InvalidArgumentException('Invalid handle: ' . $this->handle);
}
}
|
This job succeeded
Loading