Skip to content

Commit 1df7e98

Browse files
author
Lars Moelleken
committed
Merge branch 'master' of ssh://github.com/voku/simple_html_dom
* 'master' of ssh://github.com/voku/simple_html_dom: Apply fixes from StyleCI
2 parents 66e325c + b88bf15 commit 1df7e98

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/voku/helper/HtmlDomHelper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
namespace voku\helper;
66

7-
final class HtmlDomHelper {
7+
final class HtmlDomHelper
8+
{
89

910
/**
1011
* @param string $html
@@ -13,7 +14,7 @@ final class HtmlDomHelper {
1314
*
1415
* @return string
1516
*/
16-
static function mergeHtmlAttributes(
17+
public static function mergeHtmlAttributes(
1718
string $html,
1819
string $optionStr,
1920
string $htmlCssSelector
@@ -69,5 +70,4 @@ static function mergeHtmlAttributes(
6970

7071
return $domElement->html();
7172
}
72-
7373
}

src/voku/helper/HtmlDomParser.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ public function loadHtmlFile(string $filePath, $libXMLExtraOptions = null): DomP
886886
&&
887887
!\file_exists($filePath)
888888
) {
889-
throw new \RuntimeException("File " . $filePath . " not found");
889+
throw new \RuntimeException('File ' . $filePath . ' not found');
890890
}
891891

892892
try {
@@ -896,11 +896,11 @@ public function loadHtmlFile(string $filePath, $libXMLExtraOptions = null): DomP
896896
$html = \file_get_contents($filePath);
897897
}
898898
} catch (\Exception $e) {
899-
throw new \RuntimeException("Could not load file " . $filePath);
899+
throw new \RuntimeException('Could not load file ' . $filePath);
900900
}
901901

902902
if ($html === false) {
903-
throw new \RuntimeException("Could not load file " . $filePath);
903+
throw new \RuntimeException('Could not load file ' . $filePath);
904904
}
905905

906906
return $this->loadHtml($html, $libXMLExtraOptions);

tests/SimpleHtmlHelperTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
use PHPUnit\Framework\TestCase;
44

55
use voku\helper\HtmlDomHelper;
6-
use voku\helper\HtmlDomParser;
76

87
/**
98
* @internal

0 commit comments

Comments
 (0)