src/VCR/Cassette.php
public function playback(Request $request)
    {
        foreach ($this->storage as $recording) {
            $storedRequest = Request::fromArray($recording['request']);
            if ($storedRequest->matches($request, $this->getRequestMatchers())) {
                return Response::fromArray($recording['response']);
            }
        }

        return null;
    }
public function playback(Request $request)
    {
        foreach ($this->storage as $recording) {
            $storedRequest = Request::fromArray($recording['request']);
            if ($storedRequest->matches($request, $this->getRequestMatchers())) {
                return Response::fromArray($recording['response']);
            }
        }

        return null;
    }
public function playback ( Request $ request ) { foreach ( $ this -> storage as $ recording ) { $ storedRequest = Request :: fromArray ( $ recording [ 'request' ] ) ; if ( $ storedRequest -> matches ( $ request , $ this -> getRequestMatchers ( ) ) ) { return Response :: fromArray ( $ recording [ 'response' ] ) ; } } return null ; }
Returns a response for given request or null if not found.

@param Request $request Request.

@return Response|null Response for specified request.
Returns a response for given request or null if not found .