Code Duplication    Length = 13-13 lines in 2 locations

src/MenuItem.php 2 locations

@@ 82-94 (lines=13) @@
79
     *
80
     * @return array
81
     */
82
    protected static function setIconAttribute(array $properties)
83
    {
84
        $icon = array_get($properties, 'attributes.icon');
85
        if (!is_null($icon)) {
86
            $properties['icon'] = $icon;
87
88
            array_forget($properties, 'attributes.icon');
89
90
            return $properties;
91
        }
92
93
        return $properties;
94
    }
95
96
    /**
97
     * Get random name.
@@ 646-658 (lines=13) @@
643
     *
644
     * @return array
645
     */
646
    protected static function setAuthAttribute(array $properties)
647
    {
648
        $auth = array_get($properties, 'attributes.auth');
649
        if ($auth) {
650
            $properties['auth'] = (bool) $auth;
651
652
            array_forget($properties, 'attributes.auth');
653
654
            return $properties;
655
        }
656
657
        return $properties;
658
    }
659
}
660