src/Helper.php
public static function getPermissionWithAndWithoutWildcards($permissions)
    {
        $wildcard = [];
        $noWildcard = [];

        foreach ($permissions as $permission) {
            if (strpos($permission, '*') === false) {
                $noWildcard[] = $permission;
            } else {
                $wildcard[] = str_replace('*', '%', $permission);
            }
        }

        return [$wildcard, $noWildcard];
    }
public static function getPermissionWithAndWithoutWildcards($permissions)
    {
        $wildcard = [];
        $noWildcard = [];

        foreach ($permissions as $permission) {
            if (strpos($permission, '*') === false) {
                $noWildcard[] = $permission;
            } else {
                $wildcard[] = str_replace('*', '%', $permission);
            }
        }

        return [$wildcard, $noWildcard];
    }
public static function getPermissionWithAndWithoutWildcards ( $ permissions ) { $ wildcard = [ ] ; $ noWildcard = [ ] ; foreach ( $ permissions as $ permission ) { if ( strpos ( $ permission , '*' ) === false ) { $ noWildcard [ ] = $ permission ; } else { $ wildcard [ ] = str_replace ( '*' , '%' , $ permission ) ; } } return [ $ wildcard , $ noWildcard ] ; }
Return two arrays with the filtered permissions between the permissions
with wildcard and the permissions without it.

@param array $permissions
@return array [$wildcard, $noWildcard]
Return two arrays with the filtered permissions between the permissions with wildcard and the permissions without it .