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

brick / structured-data / 17475567799

04 Sep 2025 08:14PM UTC coverage: 77.67%. Remained the same
17475567799

push

github

BenMorel
Apply coding standard

14 of 15 new or added lines in 5 files covered. (93.33%)

59 existing lines in 7 files now uncovered.

240 of 309 relevant lines covered (77.67%)

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 DOMDocument;
8

9
use const LIBXML_NOERROR;
10
use const LIBXML_NOWARNING;
11

12
final class DOMBuilder
13
{
14
    /**
15
     * Builds a DOMDocument from an HTML string.
16
     */
17
    public static function fromHTML(string $html): DOMDocument
18
    {
19
        $document = new DOMDocument();
×
UNCOV
20
        $document->loadHTML($html, LIBXML_NOWARNING | LIBXML_NOERROR);
×
21

UNCOV
22
        return $document;
×
23
    }
24

25
    /**
26
     * Builds a DOMDocument from an HTML file.
27
     */
28
    public static function fromHTMLFile(string $file): DOMDocument
29
    {
30
        $document = new DOMDocument();
5✔
31
        $document->loadHTMLFile($file, LIBXML_NOWARNING | LIBXML_NOERROR);
5✔
32

33
        return $document;
5✔
34
    }
35
}
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