Inline method call
This commit is contained in:
@@ -156,7 +156,9 @@ final class IconRuntime implements RuntimeExtensionInterface
|
||||
return $svg;
|
||||
}
|
||||
|
||||
$this->throwIfTitleIsEmpty($title);
|
||||
if ('' === $title) {
|
||||
throw new \InvalidArgumentException('Title must not be an empty string!');
|
||||
}
|
||||
|
||||
return preg_replace('/(<svg(.|\n)*?>\n?)/', "$1<title>$title</title>", $svg);
|
||||
}
|
||||
@@ -177,13 +179,6 @@ final class IconRuntime implements RuntimeExtensionInterface
|
||||
return trim(preg_replace('/<\?xml.*\?>/', '', $content));
|
||||
}
|
||||
|
||||
private function throwIfTitleIsEmpty(string $title): void
|
||||
{
|
||||
if ('' === $title) {
|
||||
throw new \InvalidArgumentException('Title string must not be empty!');
|
||||
}
|
||||
}
|
||||
|
||||
private function setSvgHeightAndWidth(string $content, int $size): string
|
||||
{
|
||||
$this->throwIfSizeIsNegative($size);
|
||||
|
||||
Reference in New Issue
Block a user