Skip to content

Commit 66c40dd

Browse files
committed
type fixes
1 parent 95fe794 commit 66c40dd

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/Application/MicroPresenter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function redirectUrl(string $url, int $httpCode = Http\IResponse::S302_FO
140140
* Throws HTTP error.
141141
* @throws Nette\Application\BadRequestException
142142
*/
143-
public function error(string $message = null, int $httpCode = Http\IResponse::S404_NOT_FOUND): void
143+
public function error(string $message = '', int $httpCode = Http\IResponse::S404_NOT_FOUND): void
144144
{
145145
throw new Application\BadRequestException($message, $httpCode);
146146
}

src/Application/Responses/JsonResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class JsonResponse implements Nette\Application\IResponse
2929
public function __construct($payload, string $contentType = null)
3030
{
3131
$this->payload = $payload;
32-
$this->contentType = $contentType ? $contentType : 'application/json';
32+
$this->contentType = $contentType ?: 'application/json';
3333
}
3434

3535

src/Application/UI/Component.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ public function redirectPermanent(string $destination, $args = []): void
316316
* Throws HTTP error.
317317
* @throws Nette\Application\BadRequestException
318318
*/
319-
public function error(string $message = null, int $httpCode = Nette\Http\IResponse::S404_NOT_FOUND): void
319+
public function error(string $message = '', int $httpCode = Nette\Http\IResponse::S404_NOT_FOUND): void
320320
{
321321
throw new Nette\Application\BadRequestException($message, $httpCode);
322322
}

0 commit comments

Comments
 (0)