models/AuthItem.php
public static function getTypeName($type = null)
    {
        $result = [
            Item::TYPE_PERMISSION => 'Permission',
            Item::TYPE_ROLE => 'Role',
        ];
        if ($type === null) {
            return $result;
        }

        return $result[$type];
    }
public static function getTypeName($type = null)
    {
        $result = [
            Item::TYPE_PERMISSION => 'Permission',
            Item::TYPE_ROLE => 'Role',
        ];
        if ($type === null) {
            return $result;
        }

        return $result[$type];
    }
public static function getTypeName ( $ type = null ) { $ result = [ Item :: TYPE_PERMISSION => 'Permission' , Item :: TYPE_ROLE => 'Role' , ] ; if ( $ type === null ) { return $ result ; } return $ result [ $ type ] ; }
Get type name
@param  mixed $type
@return string|array
Get type name