Skip to content

Commit

Permalink
Merge pull request #1 from potentweb/potentweb-emptyattributes
Browse files Browse the repository at this point in the history
Empty Attributes
  • Loading branch information
potentweb authored Jun 21, 2019
2 parents 5bdd6ee + e191ee9 commit 58d5d28
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions svg/SvgTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,15 @@ public function getA11y()
public function getSvgConfig()
{
// Get the config from the params
$class = $this->getParam('class');
$height = $this->getParam('height');
$width = $this->getParam('width');

// Add the config to an array and return it.
return [
'class' => ((false) ? null : $class),
'height' => ((false) ? null : $height),
'width' => ((false) ? null : $width)
$config = [
'class' => $this->getParam('class'),
'height' => $this->getParam('height'),
'width' => $this->getParam('width'),
];

return array_filter ($config, function ($element) {
return $element;
});
}

/**
Expand Down Expand Up @@ -158,4 +157,4 @@ public function getFilePath($file)
return $asset->path();
}

}
}

0 comments on commit 58d5d28

Please sign in to comment.