mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-19 05:01:15 +02:00
PHP8
This commit is contained in:
@@ -6,11 +6,8 @@ use Psr\Http\Message\RequestInterface;
|
||||
|
||||
abstract class Handler
|
||||
{
|
||||
private ?Handler $successor = null;
|
||||
|
||||
public function __construct(Handler $handler = null)
|
||||
public function __construct(private ?Handler $successor = null)
|
||||
{
|
||||
$this->successor = $handler;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -7,13 +7,9 @@ use Psr\Http\Message\RequestInterface;
|
||||
|
||||
class HttpInMemoryCacheHandler extends Handler
|
||||
{
|
||||
private array $data;
|
||||
|
||||
public function __construct(array $data, ?Handler $successor = null)
|
||||
public function __construct(private array $data, ?Handler $successor = null)
|
||||
{
|
||||
parent::__construct($successor);
|
||||
|
||||
$this->data = $data;
|
||||
}
|
||||
|
||||
protected function processing(RequestInterface $request): ?string
|
||||
|
Reference in New Issue
Block a user