Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
update PHP
Browse files Browse the repository at this point in the history
  • Loading branch information
cevro committed Nov 3, 2022
1 parent 98d29f8 commit 856009c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "fykosak/nette-frontend-component",
"require": {
"php": ">=7.4",
"fykosak/nette-fks-utils": "dev-master#4054d9ff",
"php": "8.1.*",
"fykosak/nette-fks-utils": "*",
"nette/application": "^v3.1.0",
"nette/forms": "^3.1.0"
},
Expand Down
3 changes: 1 addition & 2 deletions src/Components/AjaxComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

abstract class AjaxComponent extends FrontEndComponent
{

private IRequest $request;
protected NetteActions $actions;

Expand All @@ -39,7 +38,7 @@ final public function addAction(string $key, string $destination, array $params
/**
* @throws AbortException
*/
final protected function sendAjaxResponse(int $code = IResponse::S200_OK): void
final protected function sendAjaxResponse(int $code = IResponse::S200_OK): never
{
$response = new AjaxResponse();
$response->setCode($code);
Expand Down
5 changes: 1 addition & 4 deletions src/Components/FrontEndComponentTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ protected function getLogger(): MemoryLogger
return $logger;
}

/**
* @return mixed
*/
protected function getData()
protected function getData(): mixed
{
return null;
}
Expand Down
4 changes: 1 addition & 3 deletions src/NetteActions/NetteActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ class NetteActions
use SmartObject;

private array $actions = [];
private Component $component;

public function __construct(Component $component)
public function __construct(private readonly Component $component)
{
$this->component = $component;
}

/**
Expand Down

0 comments on commit 856009c

Please sign in to comment.