• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

brick / structured-data / 20640234830

01 Jan 2026 02:24PM UTC coverage: 78.033% (+0.4%) from 77.67%
20640234830

Pull #5

github

web-flow
Merge 5b8139536 into 251e970ec
Pull Request #5: Utilize latest ext-dom

9 of 10 new or added lines in 4 files covered. (90.0%)

238 of 305 relevant lines covered (78.03%)

1.84 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/src/DOMBuilder.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Brick\StructuredData;
6

7
use Dom\HTMLDocument;
8

9
use const Dom\HTML_NO_DEFAULT_NS;
10
use const LIBXML_NOERROR;
11

12
final class DOMBuilder
13
{
14
    /**
15
     * Builds a HTMLDocument from an HTML string.
16
     */
17
    public static function fromHTML(string $html): HTMLDocument
18
    {
NEW
19
        return HTMLDocument::createFromString($html, LIBXML_NOERROR | HTML_NO_DEFAULT_NS);
×
20
    }
21

22
    /**
23
     * Builds a HTMLDocument from an HTML file.
24
     */
25
    public static function fromHTMLFile(string $file): HTMLDocument
26
    {
27
        return HTMLDocument::createFromFile($file, LIBXML_NOERROR | HTML_NO_DEFAULT_NS);
5✔
28
    }
29
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc