src/Support/Collection/StringSet.php
/**
     * Prepends an item to the set if it doesn't already exist in the set.
     */
Prepends an item to the set if it doesn't already exist in the set.
Prepends an item to the set if it doesn ' t already exist in the set .
public function prepend(string $item): void
    {
        if (isset($this->cache[$item])) {
            return;
        }
        array_unshift($this->list, $item);
        $this->cache[$item] = true;
        ++$this->length;
    }
public function prepend ( string $ item ) : void { if ( isset ( $ this -> cache [ $ item ] ) ) { return ; } array_unshift ( $ this -> list , $ item ) ; $ this -> cache [ $ item ] = true ; ++ $ this -> length ; }
Prepends an item to the set if it doesn't already exist in the set.
Prepends an item to the set if it doesn ' t already exist in the set .