src/Calendar/DayOfWeekCollection.php
public function addDayOfWeek(DayOfWeek $dayOfWeek)
    {
        $this->daysOfWeek = array_unique(
            array_merge(
                $this->daysOfWeek,
                [
                    $dayOfWeek->toNative(),
                ]
            )
        );

        return $this;
    }
public function addDayOfWeek(DayOfWeek $dayOfWeek)
    {
        $this->daysOfWeek = array_unique(
            array_merge(
                $this->daysOfWeek,
                [
                    $dayOfWeek->toNative(),
                ]
            )
        );

        return $this;
    }
public function addDayOfWeek ( DayOfWeek $ dayOfWeek ) { $ this -> daysOfWeek = array_unique ( array_merge ( $ this -> daysOfWeek , [ $ dayOfWeek -> toNative ( ) , ] ) ) ; return $ this ; }
Keeps the collection of days of week unique.
Makes sure that the objects are stored as strings to allow PHP serialize method.

@param DayOfWeek $dayOfWeek
@return DayOfWeekCollection
Keeps the collection of days of week unique . Makes sure that the objects are stored as strings to allow PHP serialize method .