getPendingMessages example

return $message;
        }

        return null;
    }

    /** * @return \Generator<int, array> */
    private function getNextMessages(): \Generator
    {
        yield from $this->getPendingMessages();
        yield from $this->getNewMessages();
    }

    /** * @return \Generator<int, array> */
    private function getPendingMessages(): \Generator
    {
        while (!empty($this->buffer)) {
            yield array_shift($this->buffer);
        }
    }
Home | Imprint | This part of the site doesn't use cookies.