Skip to content

Commit d194a54

Browse files
committed
fix incorrect instanceof
1 parent 8d4985a commit d194a54

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Nodes/AbstractNode.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
namespace anlutro\Menu\Nodes;
1111

1212
use anlutro\Menu\Util\StringUtils;
13+
use anlutro\Menu\Icons\IconInterface;
1314

1415
/**
1516
* A menu item.
@@ -33,7 +34,7 @@ abstract class AbstractNode
3334
/**
3435
* The icon associated with the item.
3536
*
36-
* @var \anlutro\Menu\Icons\IconInterface
37+
* @var IconInterface
3738
*/
3839
protected $icon;
3940

@@ -92,10 +93,10 @@ public static function addIconResolvers(array $resolvers)
9293
*/
9394
protected function parseAttributes(array $attributes)
9495
{
95-
if (isset($attributes['icon']) && $attributes['icon'] instanceof Icons\IconInterface) {
96+
if (isset($attributes['icon']) && $attributes['icon'] instanceof IconInterface) {
9697
$this->icon = $attributes['icon'];
9798
} else {
98-
/** @var Icons\IconInterface $resolver */
99+
/** @var IconInterface $resolver */
99100
foreach (static::$iconResolvers as $key => $resolver) {
100101
if (array_key_exists($key, $attributes)) {
101102
$this->icon = $resolver::createFromAttribute($attributes[$key]);

0 commit comments

Comments
 (0)