public function hasPlaylist(string $name): bool
    {
        $playlists = $this->getPlaylists();
        foreach ($playlists as $playlist) {
            if ($playlist->getName() === $name) {
                return true;
            }
            if (strtolower($playlist->getName()) === strtolower($name)) {
                return true;
            }
        }

        return false;
    }
public function hasPlaylist(string $name): bool
    {
        $playlists = $this->getPlaylists();
        foreach ($playlists as $playlist) {
            if ($playlist->getName() === $name) {
                return true;
            }
            if (strtolower($playlist->getName()) === strtolower($name)) {
                return true;
            }
        }

        return false;
    }
public function hasPlaylist ( string $ name ) : bool { $ playlists = $ this -> getPlaylists ( ) ; foreach ( $ playlists as $ playlist ) { if ( $ playlist -> getName ( ) === $ name ) { return true ; } if ( strtolower ( $ playlist -> getName ( ) ) === strtolower ( $ name ) ) { return true ; } } return false ; }
Check if a playlist with the specified name exists on this network.

If no case-sensitive match is found it will return a case-insensitive match.

@param string $name The name of the playlist

@return bool
Check if a playlist with the specified name exists on this network .