chore: code cleanup

This commit is contained in:
Björn Fromme
2025-08-21 14:20:43 +02:00
parent c4e28818e0
commit e36009008c
273 changed files with 547 additions and 531 deletions
+1 -1
View File
@@ -56,4 +56,4 @@ class Address
return $this;
}
}
}
+3 -2
View File
@@ -5,10 +5,11 @@ namespace App\BusProNet\Model;
class BaseDataResponse
{
public function __construct(private readonly array $items)
{}
{
}
public function getItems(): array
{
return $this->items;
}
}
}
+1 -3
View File
@@ -2,8 +2,6 @@
namespace App\BusProNet\Model;
use Symfony\Component\Serializer\Annotation\SerializedName;
class Communication
{
private ?string $phone = null;
@@ -45,4 +43,4 @@ class Communication
return $this;
}
}
}
+1 -1
View File
@@ -56,4 +56,4 @@ class Country
return $this;
}
}
}
+1 -1
View File
@@ -43,4 +43,4 @@ class CrmAttribute
return $this;
}
}
}
+1 -1
View File
@@ -30,4 +30,4 @@ class CrmAttributeGroup
return $this;
}
}
}
@@ -16,7 +16,8 @@ class CrmAttributesResponse
return $this->attributeGroups;
}
public function setAttributeGroups(?array $attributeGroups): static{
public function setAttributeGroups(?array $attributeGroups): static
{
$this->attributeGroups = $attributeGroups;
return $this;
@@ -102,4 +103,4 @@ class CrmAttributesResponse
return $crmSelections;
}
}
}
+3 -3
View File
@@ -7,7 +7,7 @@ class NotificationResponse
private ?int $code;
private ?string $message;
public function __construct(int $code = null, string $message = null)
public function __construct(?int $code = null, ?string $message = null)
{
$this->code = $code;
$this->message = $message;
@@ -33,9 +33,9 @@ class NotificationResponse
// These weird and contradictory looking assertions are required because
// of the stupid API implementation that doesn't distinguish between error
// and success responses.
$responseIsError = 100 <= $this->getCode() || $this->getMessage() === 'Daten konnten nicht gesendet werden.';
$responseIsError = 100 <= $this->getCode() || 'Daten konnten nicht gesendet werden.' === $this->getMessage();
$responseIsSuccess = 650 === $this->getCode() && false === stripos($this->getMessage(), 'fehler');
return false === $responseIsError && true === $responseIsSuccess;
}
}
}
+1 -1
View File
@@ -96,4 +96,4 @@ class Pickup
return $this;
}
}
}
+1 -1
View File
@@ -134,4 +134,4 @@ class ProfileResponse
return $this;
}
}
}