PHP code quality #242
Annotations
10 warnings
src/API/Geokoordinaten.php#L52
Escaped Mutant for Mutator "OneZeroFloat":
--- Original
+++ New
@@ @@
$this->laengengrad = $laengengrad;
return $this;
}
- public function __construct(float $breitengrad = 0.0, float $laengengrad = 0.0)
+ public function __construct(float $breitengrad = 1.0, float $laengengrad = 0.0)
{
$this->breitengrad = $breitengrad;
$this->laengengrad = $laengengrad;
}
}
|
src/API/Geokoordinaten.php#L52
Escaped Mutant for Mutator "OneZeroFloat":
--- Original
+++ New
@@ @@
$this->laengengrad = $laengengrad;
return $this;
}
- public function __construct(float $breitengrad = 0.0, float $laengengrad = 0.0)
+ public function __construct(float $breitengrad = 0.0, float $laengengrad = 1.0)
{
$this->breitengrad = $breitengrad;
$this->laengengrad = $laengengrad;
}
}
|
src/API/Master.php#L55
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
$this->value = $value;
return $this;
}
- public function __construct(bool $visible = false, ?string $value = null)
+ public function __construct(bool $visible = true, ?string $value = null)
{
$this->visible = $visible;
$this->value = $value;
}
}
|
src/API/Nutzungsart.php#L93
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
$this->waz = $waz;
return $this;
}
- public function __construct(bool $wohnen = false, bool $gewerbe = false, ?bool $anlage = null, ?bool $waz = null)
+ public function __construct(bool $wohnen = false, bool $gewerbe = true, ?bool $anlage = null, ?bool $waz = null)
{
$this->wohnen = $wohnen;
$this->gewerbe = $gewerbe;
|
src/API/Nutzungsart.php#L93
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
$this->waz = $waz;
return $this;
}
- public function __construct(bool $wohnen = false, bool $gewerbe = false, ?bool $anlage = null, ?bool $waz = null)
+ public function __construct(bool $wohnen = true, bool $gewerbe = false, ?bool $anlage = null, ?bool $waz = null)
{
$this->wohnen = $wohnen;
$this->gewerbe = $gewerbe;
|
src/API/Vermarktungsart.php#L94
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
$this->leasing = $leasing;
return $this;
}
- public function __construct(bool $kauf = false, bool $mietePacht = false, ?bool $erbpacht = null, ?bool $leasing = null)
+ public function __construct(bool $kauf = true, bool $mietePacht = false, ?bool $erbpacht = null, ?bool $leasing = null)
{
$this->kauf = $kauf;
$this->mietePacht = $mietePacht;
|
src/API/Vermarktungsart.php#L95
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
$this->leasing = $leasing;
return $this;
}
- public function __construct(bool $kauf = false, bool $mietePacht = false, ?bool $erbpacht = null, ?bool $leasing = null)
+ public function __construct(bool $kauf = false, bool $mietePacht = true, ?bool $erbpacht = null, ?bool $leasing = null)
{
$this->kauf = $kauf;
$this->mietePacht = $mietePacht;
|
src/Generator/ApiGenerator.php#L151
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
$xsdType = TypeUtil::extractTypeForPhp($extension->getBase());
}
$propertyType = TypeUtil::getValidPhpType($xsdType);
- $classProperty->setType($propertyType)->setNullable(true)->setValue(null)->addComment('@inline')->addComment('@type("' . TypeUtil::getTypeForSerializer($xsdType) . '")');
+ $classProperty->setType($propertyType)->setNullable(false)->setValue(null)->addComment('@inline')->addComment('@type("' . TypeUtil::getTypeForSerializer($xsdType) . '")');
$namespace->addUse(Type::class)->addUse(Inline::class);
CodeGenUtil::generateGetterAndSetter($classProperty, $class, true, !TypeUtil::isConstantsBasedProperty($classProperty));
}
|
src/Generator/ApiGenerator.php#L158
Escaped Mutant for Mutator "LogicalNot":
--- Original
+++ New
@@ @@
$propertyType = TypeUtil::getValidPhpType($xsdType);
$classProperty->setType($propertyType)->setNullable(true)->setValue(null)->addComment('@inline')->addComment('@type("' . TypeUtil::getTypeForSerializer($xsdType) . '")');
$namespace->addUse(Type::class)->addUse(Inline::class);
- CodeGenUtil::generateGetterAndSetter($classProperty, $class, true, !TypeUtil::isConstantsBasedProperty($classProperty));
+ CodeGenUtil::generateGetterAndSetter($classProperty, $class, true, TypeUtil::isConstantsBasedProperty($classProperty));
}
private function generateConstructor(ClassType $class) : void
{
|
src/Generator/ApiGenerator.php#L320
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
$class->addConstant($constantName, $possibleValue['value']);
}
}
- $classProperty->addComment("@see {$constantPrefix}* constants")->setValue(TypeUtil::getDefaultValueForType($classProperty->getType(), false))->setNullable(false);
+ $classProperty->addComment("@see {$constantPrefix}* constants")->setValue(TypeUtil::getDefaultValueForType($classProperty->getType(), false))->setNullable(true);
break;
case 'whiteSpace':
// do nothing. This is not a real restriction, it is just an empty block.
|
The logs for this run have expired and are no longer available.
Loading