From 7a5311138bc88862cfba21e5a8abf429ce1bc755 Mon Sep 17 00:00:00 2001 From: drowe Date: Fri, 15 Nov 2019 13:04:52 -0500 Subject: [PATCH] Automated native_function_invocation fixes --- Src/Sunra/PhpSimple/HtmlDomParser.php | 4 +- .../PhpSimple/simplehtmldom_1_5/app/index.php | 22 +- .../scraping/example_scraping_digg.php | 8 +- .../scraping/example_scraping_imdb.php | 4 +- .../scraping/example_scraping_slashdot.php | 4 +- .../example/simple_html_dom_utility.php | 2 +- .../simplehtmldom_1_5/simple_html_dom.php | 336 +++++------ .../simplehtmldom_1_5/testcase/all_test.php | 16 +- .../testcase/callback_testcase.php | 14 +- .../testcase/dom_testcase.php | 220 +++---- .../testcase/element_testcase.php | 128 ++-- .../testcase/invalid_testcase.php | 334 +++++------ .../simplehtmldom_1_5/testcase/mass_test.php | 28 +- .../testcase/memory_test.php | 60 +- .../testcase/misc_testcase.php | 46 +- .../testcase/performance_test.php | 12 +- .../testcase/reader/all_test.php | 8 +- .../testcase/reader/element_testcase.php | 100 ++-- .../testcase/reader/memory_test.php | 56 +- .../testcase/reader/performance_test.php | 12 +- .../testcase/reader/selector_testcase.php | 418 ++++++------- .../testcase/selector_testcase.php | 564 +++++++++--------- .../simplehtmldom_1_5/testcase/slick_test.php | 32 +- .../testcase/std_testcase.php | 130 ++-- .../testcase/strip_testcase.php | 30 +- 25 files changed, 1294 insertions(+), 1294 deletions(-) diff --git a/Src/Sunra/PhpSimple/HtmlDomParser.php b/Src/Sunra/PhpSimple/HtmlDomParser.php index 4f3d013..79fd4c6 100644 --- a/Src/Sunra/PhpSimple/HtmlDomParser.php +++ b/Src/Sunra/PhpSimple/HtmlDomParser.php @@ -10,7 +10,7 @@ class HtmlDomParser { * @return \simplehtmldom_1_5\simple_html_dom */ static public function file_get_html() { - return call_user_func_array ( '\simplehtmldom_1_5\file_get_html' , func_get_args() ); + return \call_user_func_array ( '\simplehtmldom_1_5\file_get_html' , \func_get_args() ); } /** @@ -18,6 +18,6 @@ static public function file_get_html() { * @return \simplehtmldom_1_5\simple_html_dom */ static public function str_get_html() { - return call_user_func_array ( '\simplehtmldom_1_5\str_get_html' , func_get_args() ); + return \call_user_func_array ( '\simplehtmldom_1_5\str_get_html' , \func_get_args() ); } } \ No newline at end of file diff --git a/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/index.php b/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/index.php index 189aa5a..bd6bbfe 100644 --- a/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/index.php +++ b/Src/Sunra/PhpSimple/simplehtmldom_1_5/app/index.php @@ -1,5 +1,5 @@ nodes). + echo 'Total: '. \count($dom->nodes). ', Text: '.$count_text. ', Commnet: '.$count_comm. ', Tag: '.$count_elem. @@ -52,27 +52,27 @@ function stat_dom($dom) { } function dump_my_html_tree($node, $show_attr=true, $deep=0, $last=true) { - $count = count($node->nodes); + $count = \count($node->nodes); if ($count>0) { if($last) - echo '
  • li11
  • li12
  • HTML; $dom->load($str); -assert($dom->find('ul', 0)->outertext==''); -assert($dom->find('ul', 1)->outertext==''); +\assert($dom->find('ul', 0)->outertext==''); +\assert($dom->find('ul', 1)->outertext==''); // ----------------------------------------------- $str = <<
  • li11
  • li12