Skip to content

Commit 3649e2f

Browse files
author
Emmanuel ROECKER
committed
improve quality code
1 parent 8b23088 commit 3649e2f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/GlHtml.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class GlHtml
4444
*/
4545
public function __construct($html)
4646
{
47-
$html = static::fixNewlines($html);
47+
$html = self::fixNewlines($html);
4848
$this->dom = new \DOMDocument();
4949

5050
$libxml_previous_state = libxml_use_internal_errors(true); //disable warnings
@@ -62,7 +62,7 @@ public function __construct($html)
6262
*
6363
* @return string the fixed text
6464
*/
65-
static private function fixNewlines($text)
65+
private static function fixNewlines($text)
6666
{
6767
$text = str_replace("\r\n", "\n", $text);
6868
$text = str_replace("\r", "\n", $text);

src/GlHtmlNode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public function getSentences()
143143
{
144144
$sentences = [];
145145
$sentence = "";
146-
static::iterateSentencesOverNode($this->node, $sentence, $sentences);
146+
self::iterateSentencesOverNode($this->node, $sentence, $sentences);
147147

148148
$sentence = trim($sentence);
149149
if (strlen($sentence) > 0) {
@@ -257,7 +257,7 @@ private static function iterateSentencesOverNode(\DOMNode $node, &$sentence, arr
257257

258258
$childs = $node->childNodes;
259259
foreach ($childs as $child) {
260-
static::iterateSentencesOverNode($child, $sentence, $sentences);
260+
self::iterateSentencesOverNode($child, $sentence, $sentences);
261261
}
262262

263263
switch ($name) {

0 commit comments

Comments
 (0)