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

brick / structured-data / 20179922799

12 Dec 2025 09:07PM UTC coverage: 78.033% (+0.4%) from 77.67%
20179922799

Pull #5

github

web-flow
Merge 868f96775 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
use const LIBXML_NOWARNING;
12

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

23
    /**
24
     * Builds a HTMLDocument from an HTML file.
25
     */
26
    public static function fromHTMLFile(string $file) : HTMLDocument
27
    {
28
        return HTMLDocument::createFromFile($file,  LIBXML_NOERROR | HTML_NO_DEFAULT_NS);
5✔
29
    }
30
}
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