diff --git a/src/Action/History.php b/src/Action/History.php index e31dc1f..e3d1da7 100644 --- a/src/Action/History.php +++ b/src/Action/History.php @@ -6,6 +6,8 @@ use Chanshige\SmartLock\Sesame\Interface\DeviceInterface; +use function assert; + final class History extends AbstractAction { public function __construct( @@ -13,6 +15,8 @@ public function __construct( private readonly int $page = 0, private readonly int $lg = 50, ) { + assert($this->device instanceof DeviceInterface); + parent::__construct($device); } diff --git a/src/Http/ResponseInterface.php b/src/Http/ResponseInterface.php index 6213fe4..196fb61 100644 --- a/src/Http/ResponseInterface.php +++ b/src/Http/ResponseInterface.php @@ -6,7 +6,7 @@ interface ResponseInterface { - /** @return array */ + /** @return array> */ public function headers(): array; public function statusCode(): int; diff --git a/src/Interface/ActionInterface.php b/src/Interface/ActionInterface.php index 1d840c2..32ddad5 100644 --- a/src/Interface/ActionInterface.php +++ b/src/Interface/ActionInterface.php @@ -6,8 +6,6 @@ interface ActionInterface extends DeviceInterface { - public function __construct(DeviceInterface $device); - public function method(): string; public function path(): string;