From c33825df914848ba019f4a0b15a02ea74b34b292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Tue, 3 Sep 2024 20:04:24 +0900 Subject: [PATCH] Automation ini... --- app/Controllers/Admin/UserController.php | 4 ++-- app/Libraries/MyCrawler/MyCrawlerLibrary.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Controllers/Admin/UserController.php b/app/Controllers/Admin/UserController.php index fbc8fd8..f9d2197 100644 --- a/app/Controllers/Admin/UserController.php +++ b/app/Controllers/Admin/UserController.php @@ -15,12 +15,12 @@ class UserController extends AdminController $this->_model = new UserModel(); } - public function index() + public function index(): string { return __METHOD__; } - public function point() + public function point(): string { try { $id = $this->request->getPost('id'); diff --git a/app/Libraries/MyCrawler/MyCrawlerLibrary.php b/app/Libraries/MyCrawler/MyCrawlerLibrary.php index dd8b86b..881d2d5 100644 --- a/app/Libraries/MyCrawler/MyCrawlerLibrary.php +++ b/app/Libraries/MyCrawler/MyCrawlerLibrary.php @@ -32,7 +32,7 @@ class MyCrawlerLibrary public function getLinks(Crawler $crawler, array $options = ["tag" => "a", "attr" => "href"]): array { $links = $crawler->filter($options["tag"])->each( - function (Crawler $node) use (&$options) { + function (Crawler $node) use (&$options): array { return [ "anchor" => $node->text(), "href" => $node->attr($options["attr"]) @@ -48,7 +48,7 @@ class MyCrawlerLibrary public function getImages(Crawler $crawler, array $options = ["tag" => "img", "attr" => "src"]): array { $images = $crawler->filter($options["tag"])->each( - function (Crawler $node) use (&$options) { + function (Crawler $node) use (&$options): array { return [ "alt" => $node->attr('alt'), "src" => $node->attr($options["attr"]) @@ -64,7 +64,7 @@ class MyCrawlerLibrary public function getVideos(Crawler $crawler, array $options = ["tag" => "video", "attr" => "src"]): array { $videos = $crawler->filter($options["tag"])->each( - function (Crawler $node) use (&$options) { + function (Crawler $node) use (&$options): array { return [ "alt" => $node->attr('alt'), "src" => $node->attr($options["attr"])