Automation ini...

This commit is contained in:
최준흠 2024-09-03 20:04:24 +09:00
parent 13ed3973b7
commit c33825df91
2 changed files with 5 additions and 5 deletions

View File

@ -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');

View File

@ -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"])