-
Notifications
You must be signed in to change notification settings - Fork 6
add void return types #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Returning static for a fluent interface is probably better. |
||
| { | ||
| $this->classes[$id] = $class; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Returning static for a fluent interface is probably better. |
||
| { | ||
| $this->models[] = $model; | ||
| } | ||
|
|
@@ -131,4 +131,4 @@ public function offsetUnset(mixed $offset): void | |
| unset($this->models[$offset]); | ||
| } | ||
|
|
||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Returning static for a fluent interface is probably better. |
||
| { | ||
| $this->group[] = $conditionOrGroup; | ||
| } | ||
|
|
@@ -128,4 +128,4 @@ public function count(): int | |
| { | ||
| return count($this->group); | ||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returning static for a fluent interface is probably better.