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

wol-soft / php-json-schema-model-generator-production / 25722874106

12 May 2026 08:29AM UTC coverage: 23.529% (+0.3%) from 23.276%
25722874106

Pull #14

github

web-flow
Merge cdd636bac into 76710d87f
Pull Request #14: Json schema draft7

32 of 123 new or added lines in 15 files covered. (26.02%)

1 existing line in 1 file now uncovered.

164 of 697 relevant lines covered (23.53%)

0.79 hits per line

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

0.0
/src/Filter/AbstractMediaStringFilter.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace PHPModelGenerator\Filter;
6

7
use InvalidArgumentException;
8

9
abstract class AbstractMediaStringFilter
10
{
11
    /**
12
     * @param array{mediaType?: string|null, encoding?: string|null} $options
13
     *
14
     * @throws InvalidArgumentException
15
     */
NEW
16
    protected static function assertMetadataMatch(
×
17
        ?string $actualMediaType,
18
        ?string $actualEncoding,
19
        array $options,
20
    ): void {
NEW
21
        $expectedMediaType = $options['mediaType'] ?? null;
×
NEW
22
        $expectedEncoding = $options['encoding'] ?? null;
×
23

NEW
24
        if ($actualMediaType !== $expectedMediaType) {
×
NEW
25
            throw new InvalidArgumentException(sprintf(
×
NEW
26
                'MediaString mediaType mismatch: expected %s, got %s',
×
NEW
27
                $expectedMediaType ?? 'null',
×
NEW
28
                $actualMediaType ?? 'null',
×
NEW
29
            ));
×
30
        }
31

NEW
32
        if ($actualEncoding !== $expectedEncoding) {
×
NEW
33
            throw new InvalidArgumentException(sprintf(
×
NEW
34
                'MediaString encoding mismatch: expected %s, got %s',
×
NEW
35
                $expectedEncoding ?? 'null',
×
NEW
36
                $actualEncoding ?? 'null',
×
NEW
37
            ));
×
38
        }
39
    }
40
}
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