public function add($location): bool
    {
        if ($this->hasLocation($location)) {
            return false;
        }

        return parent::add($location);
    }
public function add($location): bool
    {
        if ($this->hasLocation($location)) {
            return false;
        }

        return parent::add($location);
    }
public function add ( $ location ) : bool { if ( $ this -> hasLocation ( $ location ) ) { return false ; } return parent :: add ( $ location ) ; }
Adds a location at the end of the collection if it does not already exist.

@param mixed $location The location to add.

@return bool Whether the location was added or not.
Adds a location at the end of the collection if it does not already exist .