Completed
Push — master ( bfaa7e...162bcd )
by Lars
04:53 queued 11s
created
src/voku/helper/SimpleHtmlDom.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -710,7 +710,7 @@
 block discarded – undo
710 710
      *
711 711
      * @param string $name <p>The name of the html-attribute.</p>
712 712
      *
713
-     * @return mixed
713
+     * @return SimpleHtmlDom
714 714
      */
715 715
     public function removeAttribute(string $name)
716 716
     {
Please login to merge, or discard this patch.
src/voku/helper/HtmlDomParser.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -446,10 +446,10 @@
 block discarded – undo
446 446
                 '/(?<start>.*)<(?<element_start>[a-z]+)(?<element_start_addon> [^>]*)?>(?<value>.*?)<\/(?<element_end>\2)>(?<end>.*)/sui',
447 447
                 function ($matches) {
448 448
                     return $matches['start'] .
449
-                           '°lt_simple_html_dom__voku_°' . $matches['element_start'] . $matches['element_start_addon'] . '°gt_simple_html_dom__voku_°' .
450
-                           $matches['value'] .
451
-                           '°lt/_simple_html_dom__voku_°' . $matches['element_end'] . '°gt_simple_html_dom__voku_°' .
452
-                           $matches['end'];
449
+                            '°lt_simple_html_dom__voku_°' . $matches['element_start'] . $matches['element_start_addon'] . '°gt_simple_html_dom__voku_°' .
450
+                            $matches['value'] .
451
+                            '°lt/_simple_html_dom__voku_°' . $matches['element_end'] . '°gt_simple_html_dom__voku_°' .
452
+                            $matches['end'];
453 453
                 },
454 454
                 $html
455 455
             );
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
             return \call_user_func_array([$this, self::$functionAliases[$name]], $arguments);
159 159
         }
160 160
 
161
-        throw new \BadMethodCallException('Method does not exist: ' . $name);
161
+        throw new \BadMethodCallException('Method does not exist: '.$name);
162 162
     }
163 163
 
164 164
     /**
@@ -315,8 +315,8 @@  discard block
 block discarded – undo
315 315
                 self::$domReplaceHelper['orig']
316 316
             );
317 317
 
318
-            $DOM_REPLACE__HELPER_CACHE['tmp']['html_wrapper__start'] = '<' . self::$domHtmlWrapperHelper . '>';
319
-            $DOM_REPLACE__HELPER_CACHE['tmp']['html_wrapper__end'] = '</' . self::$domHtmlWrapperHelper . '>';
318
+            $DOM_REPLACE__HELPER_CACHE['tmp']['html_wrapper__start'] = '<'.self::$domHtmlWrapperHelper.'>';
319
+            $DOM_REPLACE__HELPER_CACHE['tmp']['html_wrapper__end'] = '</'.self::$domHtmlWrapperHelper.'>';
320 320
 
321 321
             $DOM_REPLACE__HELPER_CACHE['orig']['html_wrapper__start'] = '';
322 322
             $DOM_REPLACE__HELPER_CACHE['orig']['html_wrapper__end'] = '';
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
             ||
391 391
             $this->keepBrokenHtml === true
392 392
         ) {
393
-            $html = '<' . self::$domHtmlWrapperHelper . '>' . $html . '</' . self::$domHtmlWrapperHelper . '>';
393
+            $html = '<'.self::$domHtmlWrapperHelper.'>'.$html.'</'.self::$domHtmlWrapperHelper.'>';
394 394
         }
395 395
 
396 396
         $html = self::replaceToPreserveHtmlEntities($html);
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
             $xmlHackUsed = false;
405 405
             if (\stripos('<?xml', $html) !== 0) {
406 406
                 $xmlHackUsed = true;
407
-                $html = '<?xml encoding="' . $this->getEncoding() . '" ?>' . $html;
407
+                $html = '<?xml encoding="'.$this->getEncoding().'" ?>'.$html;
408 408
             }
409 409
 
410 410
             $this->document->loadHTML($html, $optionsXml);
@@ -444,11 +444,11 @@  discard block
 block discarded – undo
444 444
 
445 445
             $html = (string) \preg_replace_callback(
446 446
                 '/(?<start>.*)<(?<element_start>[a-z]+)(?<element_start_addon> [^>]*)?>(?<value>.*?)<\/(?<element_end>\2)>(?<end>.*)/sui',
447
-                function ($matches) {
448
-                    return $matches['start'] .
449
-                           '°lt_simple_html_dom__voku_°' . $matches['element_start'] . $matches['element_start_addon'] . '°gt_simple_html_dom__voku_°' .
450
-                           $matches['value'] .
451
-                           '°lt/_simple_html_dom__voku_°' . $matches['element_end'] . '°gt_simple_html_dom__voku_°' .
447
+                function($matches) {
448
+                    return $matches['start'].
449
+                           '°lt_simple_html_dom__voku_°'.$matches['element_start'].$matches['element_start_addon'].'°gt_simple_html_dom__voku_°'.
450
+                           $matches['value'].
451
+                           '°lt/_simple_html_dom__voku_°'.$matches['element_end'].'°gt_simple_html_dom__voku_°'.
452 452
                            $matches['end'];
453 453
                 },
454 454
                 $html
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
 
461 461
             $html = (string) \preg_replace_callback(
462 462
                 '/(?<start>[^<]*)?(?<broken>(?:(?:<\/\w+(?:\s+\w+=\\"[^\"]+\\")*+)(?:[^<]+)>)+)(?<end>.*)/u',
463
-                function ($matches) {
463
+                function($matches) {
464 464
                     $matches['broken'] = \str_replace(
465 465
                         ['°lt/_simple_html_dom__voku_°', '°lt_simple_html_dom__voku_°', '°gt_simple_html_dom__voku_°'],
466 466
                         ['</', '<', '>'],
@@ -468,9 +468,9 @@  discard block
 block discarded – undo
468 468
                     );
469 469
 
470 470
                     self::$domBrokenReplaceHelper['orig'][] = $matches['broken'];
471
-                    self::$domBrokenReplaceHelper['tmp'][] = $matchesHash = '____simple_html_dom__voku__broken_html____' . \crc32($matches['broken']);
471
+                    self::$domBrokenReplaceHelper['tmp'][] = $matchesHash = '____simple_html_dom__voku__broken_html____'.\crc32($matches['broken']);
472 472
 
473
-                    return $matches['start'] . $matchesHash . $matches['end'];
473
+                    return $matches['start'].$matchesHash.$matches['end'];
474 474
                 },
475 475
                 $html
476 476
             );
Please login to merge, or discard this patch.