src/SpotifyWebAPI.php
protected function uriToId($uriIds, $type)
    {
        $type = 'spotify:' . $type . ':';

        $uriIds = array_map(function ($id) use ($type) {
            return str_replace($type, '', $id);
        }, (array) $uriIds);

        return (count($uriIds) == 1) ? $uriIds[0] : $uriIds;
    }
protected function uriToId($uriIds, $type)
    {
        $type = 'spotify:' . $type . ':';

        $uriIds = array_map(function ($id) use ($type) {
            return str_replace($type, '', $id);
        }, (array) $uriIds);

        return (count($uriIds) == 1) ? $uriIds[0] : $uriIds;
    }
protected function uriToId ( $ uriIds , $ type ) { $ type = 'spotify:' . $ type . ':' ; $ uriIds = array_map ( function ( $ id ) use ( $ type ) { return str_replace ( $ type , '' , $ id ) ; } , ( array ) $ uriIds ) ; return ( count ( $ uriIds ) == 1 ) ? $ uriIds [ 0 ] : $ uriIds ; }
Convert Spotify URIs to Spotify object IDs

@param array|string $uriIds URI(s) to convert.
@param string $type Spotify object type.

@return array|string Spotify ID(s).
Convert Spotify URIs to Spotify object IDs