Change method name
This commit is contained in:
@@ -39,7 +39,7 @@ final class IconRuntime implements RuntimeExtensionInterface
|
||||
*/
|
||||
public function renderIcon(array $userOptions): string
|
||||
{
|
||||
$options = $this->getMergedOptions($userOptions);
|
||||
$options = $this->mergeWithDefaultOptions($userOptions);
|
||||
|
||||
$svg = $this->getSanitisedIconSvg($options['icon']);
|
||||
|
||||
@@ -58,7 +58,7 @@ final class IconRuntime implements RuntimeExtensionInterface
|
||||
return implode(' ', $extraClasses);
|
||||
}
|
||||
|
||||
private function getMergedOptions(array $userOptions): array
|
||||
private function mergeWithDefaultOptions(array $userOptions): array
|
||||
{
|
||||
$this->throwIfUnrecognisedOptionExists($userOptions);
|
||||
return $this->mergeUserOptionsWithDefaults($userOptions);
|
||||
@@ -187,6 +187,7 @@ final class IconRuntime implements RuntimeExtensionInterface
|
||||
private function setSvgHeightAndWidth(string $content, int $size): string
|
||||
{
|
||||
$this->throwIfSizeIsNegative($size);
|
||||
|
||||
$svgAsXmlElement = new \SimpleXMLElement($content);
|
||||
$svgAsXmlElement = $this->addAttributeToXmlElement($svgAsXmlElement, 'width', $size);
|
||||
$svgAsXmlElement = $this->addAttributeToXmlElement($svgAsXmlElement, 'height', $size);
|
||||
|
||||
Reference in New Issue
Block a user