public function clearExpiredCookies(): void
    {
        $cookies = $this->getCookies();
        foreach ($cookies as $i => $cookie) {
            if ($cookie->isExpired()) {
                unset($cookies[$i]);
            }
        }

        $this->clear();
        $this->setCookies(array_values($cookies));
    }
public function clearExpiredCookies(): void
    {
        $cookies = $this->getCookies();
        foreach ($cookies as $i => $cookie) {
            if ($cookie->isExpired()) {
                unset($cookies[$i]);
            }
        }

        $this->clear();
        $this->setCookies(array_values($cookies));
    }
public function clearExpiredCookies ( ) : void { $ cookies = $ this -> getCookies ( ) ; foreach ( $ cookies as $ i => $ cookie ) { if ( $ cookie -> isExpired ( ) ) { unset ( $ cookies [ $ i ] ) ; } } $ this -> clear ( ) ; $ this -> setCookies ( array_values ( $ cookies ) ) ; }
Removes expired cookies.
Removes expired cookies .