Merge pull request #90 from ujamii/dependabot/github_actions/codecov/… #305
php.yml
on: push
Static code analysis
32s
Rector
16s
Matrix: test
Annotations
28 warnings
Tests on PHP 8.1:
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;
}
}
|
Tests on PHP 8.1:
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;
}
}
|
Tests on PHP 8.1:
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;
}
}
|
Tests on PHP 8.1:
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;
|
Tests on PHP 8.1:
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;
|
Tests on PHP 8.1:
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;
|
Tests on PHP 8.1:
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;
|
Tests on PHP 8.1:
src/Generator/ApiGenerator.php#L222
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
}
$classProperty->setType($phpType)->setNullable($nullable);
if ($nullable) {
- $classProperty->setValue(null);
+
} else {
$classProperty->setValue(TypeUtil::getDefaultValueForType($phpType, $nullable))->addComment('@SkipWhenEmpty');
$namespace->addUse(SkipWhenEmpty::class);
|
Tests on PHP 8.1:
src/Generator/ApiGenerator.php#L248
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
private function getPhpPropertyTypeFromXsdElement($property): string
{
if ($property instanceof ElementRef) {
- if ($property->getReferencedElement()->getType() instanceof SimpleType) {
+ if (true) {
$propertyType = TypeUtil::extractTypeForPhp($property->getReferencedElement()->getType());
} else {
$propertyType = TypeUtil::camelize($property->getReferencedElement()->getName());
|
Tests on PHP 8.2:
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;
}
}
|
Tests on PHP 8.2:
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;
}
}
|
Tests on PHP 8.2:
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;
}
}
|
Tests on PHP 8.2:
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;
|
Tests on PHP 8.2:
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;
|
Tests on PHP 8.2:
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;
|
Tests on PHP 8.2:
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;
|
Tests on PHP 8.2:
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));
}
|
Tests on PHP 8.2:
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
{
|
Tests on PHP 8.2:
src/Generator/ApiGenerator.php#L222
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
}
$classProperty->setType($phpType)->setNullable($nullable);
if ($nullable) {
- $classProperty->setValue(null);
+
} else {
$classProperty->setValue(TypeUtil::getDefaultValueForType($phpType, $nullable))->addComment('@SkipWhenEmpty');
$namespace->addUse(SkipWhenEmpty::class);
|
Tests on PHP 8.3:
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;
}
}
|
Tests on PHP 8.3:
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;
}
}
|
Tests on PHP 8.3:
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;
}
}
|
Tests on PHP 8.3:
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;
|
Tests on PHP 8.3:
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;
|
Tests on PHP 8.3:
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;
|
Tests on PHP 8.3:
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;
|
Tests on PHP 8.3:
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
{
|
Tests on PHP 8.3:
src/Generator/ApiGenerator.php#L323
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.
|