Skip to content

Commit

Permalink
Presenter: Add return never typehint. (#291) (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek authored and dg committed Aug 24, 2021
1 parent 52b867a commit 3930fd6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Application/UI/Presenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ public function setLayout($layout)

/**
* @throws Nette\Application\AbortException
* @return never
*/
public function sendTemplate(Template $template = null): void
{
Expand Down Expand Up @@ -595,6 +596,7 @@ public function isAjax(): bool
/**
* Sends AJAX payload to the output.
* @throws Nette\Application\AbortException
* @return never
*/
public function sendPayload(): void
{
Expand All @@ -606,6 +608,7 @@ public function sendPayload(): void
* Sends JSON data to the output.
* @param mixed $data
* @throws Nette\Application\AbortException
* @return never
*/
public function sendJson($data): void
{
Expand All @@ -619,6 +622,7 @@ public function sendJson($data): void
/**
* Sends response and terminates presenter.
* @throws Nette\Application\AbortException
* @return never
*/
public function sendResponse(Application\Response $response): void
{
Expand All @@ -630,6 +634,7 @@ public function sendResponse(Application\Response $response): void
/**
* Correctly terminates presenter.
* @throws Nette\Application\AbortException
* @return never
*/
public function terminate(): void
{
Expand All @@ -642,6 +647,7 @@ public function terminate(): void
* @param string|Nette\Application\Request $destination
* @param array|mixed $args
* @throws Nette\Application\AbortException
* @return never
*/
public function forward($destination, $args = []): void
{
Expand All @@ -660,6 +666,7 @@ public function forward($destination, $args = []): void
/**
* Redirect to another URL and ends presenter execution.
* @throws Nette\Application\AbortException
* @return never
*/
public function redirectUrl(string $url, int $httpCode = null): void
{
Expand Down

0 comments on commit 3930fd6

Please sign in to comment.