Skip to content

Commit 1e7d6b0

Browse files
committed
refactor(icon): simplify icon identifier parsing
1 parent 1a5a9a6 commit 1e7d6b0

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

packages/icon/src/Icon.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,7 @@ public function __construct(
3030
*/
3131
public function render(string $icon): ?string
3232
{
33-
$parsedIconIdentifier = $this->parseIconIdentifier($icon);
34-
35-
if ($parsedIconIdentifier === null) {
36-
return null;
37-
}
38-
39-
[$collection, $iconName] = $parsedIconIdentifier;
33+
[$collection, $iconName] = $this->parseIconIdentifier($icon) ?? [null, null];
4034

4135
if ($this->iconCache->get("icon-failure-{$collection}-{$iconName}")) {
4236
return null;

0 commit comments

Comments
 (0)