From c77bf8cfce7d2c29d3f3995c874559ece2365f89 Mon Sep 17 00:00:00 2001 From: Seriyyy95 Date: Tue, 23 Apr 2024 21:44:58 +0300 Subject: [PATCH] style-ci --- src/Dom/Dom.php | 2 +- src/Dom/Node.php | 6 +++--- src/Exception/StaleElementException.php | 1 - src/Page.php | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Dom/Dom.php b/src/Dom/Dom.php index 96f491a..ac73759 100644 --- a/src/Dom/Dom.php +++ b/src/Dom/Dom.php @@ -55,7 +55,7 @@ public function search(string $selector): array return $nodes; } - public function prepareForRequest(bool $throw = true) + public function prepareForRequest(bool $throw = true): void { $this->page->assertNotClosed(); diff --git a/src/Dom/Node.php b/src/Dom/Node.php index aa8044b..c55d5ed 100644 --- a/src/Dom/Node.php +++ b/src/Dom/Node.php @@ -32,14 +32,14 @@ public function __construct(Page $page, int $nodeId) $this->page = $page; $this->nodeId = $nodeId; - $page->getSession()->on('method:DOM.documentUpdated', function (...$event) { + $page->getSession()->on('method:DOM.documentUpdated', function (...$event): void { $this->isStale = true; }); } public function getNodeId(): int { - return $this->nodeId; + return $this->nodeId; } public function getNodeIdForRequest(): int @@ -237,7 +237,7 @@ public function assertNotError(Response $response): void } } - protected function prepareForRequest() + protected function prepareForRequest(): void { $this->page->assertNotClosed(); diff --git a/src/Exception/StaleElementException.php b/src/Exception/StaleElementException.php index f3bb347..0fb744c 100644 --- a/src/Exception/StaleElementException.php +++ b/src/Exception/StaleElementException.php @@ -4,5 +4,4 @@ class StaleElementException extends DomException { - } diff --git a/src/Page.php b/src/Page.php index b664d12..10fd2d9 100644 --- a/src/Page.php +++ b/src/Page.php @@ -814,7 +814,7 @@ public function dom(): Dom { $this->assertNotClosed(); - if ($this->dom === null) { + if (null === $this->dom) { $this->dom = new Dom($this); }