From 43c7887b54aaad56188aea4a09d7dfb28c50fe0f Mon Sep 17 00:00:00 2001 From: Paul Vogel Date: Wed, 26 Nov 2025 14:32:20 +0100 Subject: [PATCH] add void return types --- src/BaseModel.php | 4 ++-- src/Driver/DriverRegistry.php | 4 ++-- src/ModelCollection.php | 4 ++-- src/Query/WhereGroup.php | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/BaseModel.php b/src/BaseModel.php index 843efb3..34c65d4 100644 --- a/src/BaseModel.php +++ b/src/BaseModel.php @@ -106,7 +106,7 @@ public function setId(mixed $id): static /** * Generate an unique identifier for the model */ - protected function generateId() + protected function generateId(): void { $characters = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; $charactersLength = strlen($characters); @@ -152,4 +152,4 @@ public function getField(string $key): mixed return $this->additionalFields[$key] ?? null; } } -} \ No newline at end of file +} diff --git a/src/Driver/DriverRegistry.php b/src/Driver/DriverRegistry.php index f2fffa6..c9322d8 100644 --- a/src/Driver/DriverRegistry.php +++ b/src/Driver/DriverRegistry.php @@ -37,7 +37,7 @@ class DriverRegistry implements DriverRegistryInterface * * @param DriverInterface $driver */ - public function registerDriver(DriverInterface $driver) + public function registerDriver(DriverInterface $driver): void { $this->drivers[$driver->getId()] = $driver; } @@ -50,7 +50,7 @@ public function registerDriver(DriverInterface $driver) * @param string $id * @param string $class */ - public function registerDriverClass(string $id, string $class) + public function registerDriverClass(string $id, string $class): void { $this->classes[$id] = $class; } diff --git a/src/ModelCollection.php b/src/ModelCollection.php index 2e1475f..0a06f64 100644 --- a/src/ModelCollection.php +++ b/src/ModelCollection.php @@ -23,7 +23,7 @@ class ModelCollection implements Iterator, Countable, ArrayAccess * @param TModel $model * @noinspection PhpDocSignatureInspection */ - public function add(ModelInterface $model) + public function add(ModelInterface $model): void { $this->models[] = $model; } @@ -131,4 +131,4 @@ public function offsetUnset(mixed $offset): void unset($this->models[$offset]); } -} \ No newline at end of file +} diff --git a/src/Query/WhereGroup.php b/src/Query/WhereGroup.php index 0ea6d60..a39eedc 100644 --- a/src/Query/WhereGroup.php +++ b/src/Query/WhereGroup.php @@ -54,7 +54,7 @@ public function __construct(array $conditions = [], int $conjunction = self:: AN * * @param WhereCondition|WhereGroup $conditionOrGroup */ - public function add(WhereCondition|WhereGroup $conditionOrGroup) + public function add(WhereCondition|WhereGroup $conditionOrGroup): void { $this->group[] = $conditionOrGroup; } @@ -128,4 +128,4 @@ public function count(): int { return count($this->group); } -} \ No newline at end of file +}