Skip to content

Commit d98800b

Browse files
$opts array by default
1 parent ccf0c8e commit d98800b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/FontAwesomeSVG.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function __construct($svg_dir) {
1818
* @param array $opts options array
1919
* @return string|boolean
2020
*/
21-
public function get_svg($id, $opts=false) {
21+
public function get_svg($id, $opts=[]) {
2222
try {
2323
$icon = $this->get_icon_details($id);
2424
} catch(Exception $e) {
@@ -36,11 +36,7 @@ public function get_svg($id, $opts=false) {
3636
'fill' => 'currentColor',
3737
];
3838

39-
if (is_array($opts)) {
40-
$opts = array_merge($default_opts, $opts);
41-
} else {
42-
$opts = $default_opts;
43-
}
39+
$opts = array_merge($default_opts, $opts);
4440

4541

4642

0 commit comments

Comments
 (0)