final class StaticBadge

Checks that a static shields.io badge image shows the value and role its alt text and title declare, so the rendered card cannot mislead.

Methods§

public static function validate(string $url, string $field, string $value): void

Checks a badge image; images from other hosts or paths are not checked.

Parameters

$urlstringThe image URL
$fieldstringThe field the badge sets
$valuestringThe value in its alt text

Throws

InvalidInputException When the static image shows another role or value
Test cases 2
Called from 1
Calls 7

Test cases 6§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 2
Other tests reaching this symbol 4

Relations§

Static calls 1