Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 399
Zeile 141... Zeile 141...
141
     *
141
     *
142
     * @throws \OutOfBoundsException
142
     * @throws \OutOfBoundsException
143
     */
143
     */
144
    public function __invoke()
144
    public function __invoke()
145
    {
145
    {
146
        if ($this->failWhenEmpty && count($this->responses) === 0) {
146
        if ($this->failWhenEmpty && $this->isEmpty()) {
147
            throw new OutOfBoundsException('A request was made, but the response sequence is empty.');
147
            throw new OutOfBoundsException('A request was made, but the response sequence is empty.');
148
        }
148
        }
Zeile 149... Zeile 149...
149
 
149
 
150
        if (! $this->failWhenEmpty && count($this->responses) === 0) {
150
        if (! $this->failWhenEmpty && $this->isEmpty()) {
151
            return value($this->emptyResponse ?? Factory::response());
151
            return value($this->emptyResponse ?? Factory::response());
Zeile 152... Zeile 152...
152
        }
152
        }
153
 
153