public function flip(): self
    {
        $collection = Factory::create();
        foreach ($this->items as $key => $value) {
            $collection->set($value, $key);
        }

        return $collection;
    }
public function flip(): self
    {
        $collection = Factory::create();
        foreach ($this->items as $key => $value) {
            $collection->set($value, $key);
        }

        return $collection;
    }
public function flip ( ) : self { $ collection = Factory :: create ( ) ; foreach ( $ this -> items as $ key => $ value ) { $ collection -> set ( $ value , $ key ) ; } return $ collection ; }
Flip the keys and the values and return a new Collection.

@performanceCompared true
Flip the keys and the values and return a new Collection .