Browse Source

Style fixes

master
J. King 4 years ago
parent
commit
096cf6ce3f
  1. 1
      lib/Parser/Construct.php
  2. 2
      lib/Parser/Parser.php
  3. 1
      tests/cases/Util/Date/DateTest.php

1
lib/Parser/Construct.php

@ -7,7 +7,6 @@ declare(strict_types=1);
namespace MensBeam\Lax\Parser;
use MensBeam\Lax\Collection;
use MensBeam\Lax\Date;
trait Construct {
/** Trims plain text and collapses whitespace */

2
lib/Parser/Parser.php

@ -34,7 +34,7 @@ abstract class Parser {
} elseif (preg_match('/^\s*</s', $data)) {
// distinguish between XML feeds and HTML; first skip any comments before the root element
$offset = preg_match('/^\s*(?:<!--(?:[^\-]|-(?!->)*-->\s*)*/s', $data, $match) ? strlen($match[0]) : 0;
$prefix = substr($data, $offset, 100); //
$prefix = substr($data, $offset, 100);
if (preg_match('/^<(?:!DOCTYPE\s+html|html|body|head|table|div|title|p|link|meta)[\s>]/si', $prefix)) {
return "text/html";
} elseif (preg_match('/^<rss[\s>\/]/', $prefix)) {

1
tests/cases/Util/Date/DateTest.php

@ -75,7 +75,6 @@ class DateTest extends \PHPUnit\Framework\TestCase {
if (is_array($test->input)) {
foreach ($test->input as $input) {
yield "$description ($input)" => [$input, $test->output];
}
} else {
yield "$description" => [$test->input, $test->output];

Loading…
Cancel
Save