Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Application/UI/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
$throw = func_get_arg(0);
}

return $this->lookup(Presenter::class, throw: $throw ?? true);

Check failure on line 45 in src/Application/UI/Component.php

View workflow job for this annotation

GitHub Actions / PHPStan

Method Nette\Application\UI\Component::getPresenter() should return Nette\Application\UI\Presenter|null but returns Nette\ComponentModel\IComponent|null.
}


Expand Down Expand Up @@ -382,7 +382,7 @@
* Throws HTTP error.
* @throws Nette\Application\BadRequestException
*/
public function error(string $message = '', int $httpCode = Nette\Http\IResponse::S404_NotFound): void
public function error(string $message = '', int $httpCode = Nette\Http\IResponse::S404_NotFound): never
{
throw new Nette\Application\BadRequestException($message, $httpCode);
}
Expand Down
Loading