Skip to content

Commit fa48b49

Browse files
committed
added PHP 8 typehints
1 parent 09dcc8d commit fa48b49

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/ComponentModel/Component.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,10 @@ final public function getParent(): ?IContainer
159159
/**
160160
* Sets or removes the parent of this component. This method is managed by containers and should
161161
* not be called by applications
162-
* @return static
163162
* @throws Nette\InvalidStateException
164163
* @internal
165164
*/
166-
public function setParent(?IContainer $parent, ?string $name = null)
165+
public function setParent(?IContainer $parent, ?string $name = null): static
167166
{
168167
if ($parent === null && $this->parent === null && $name !== null) {
169168
$this->name = $name; // just rename

src/ComponentModel/IComponent.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ function getParent(): ?IContainer;
3030

3131
/**
3232
* Sets the parent of this component.
33-
* @return static
3433
*/
35-
function setParent(?IContainer $parent, ?string $name = null);
34+
function setParent(?IContainer $parent, ?string $name = null): static;
3635
}

0 commit comments

Comments
 (0)