@@ 128-142 (lines=15) @@ | ||
125 | * |
|
126 | * @return Request |
|
127 | */ |
|
128 | protected function with(array $parameters): self |
|
129 | { |
|
130 | $defaults = [ |
|
131 | 'uri' => $this->uri, |
|
132 | 'method' => $this->method, |
|
133 | 'headers' => $this->headers, |
|
134 | 'body' => $this->body, |
|
135 | 'protocolVersion' => $this->protocolVersion, |
|
136 | 'requestTarget' => $this->requestTarget, |
|
137 | ]; |
|
138 | ||
139 | $arguments = array_values(array_replace($defaults, $parameters, ['__previous' => $this])); |
|
140 | ||
141 | return new static(...$arguments); |
|
142 | } |
|
143 | } |
|
144 |
@@ 143-156 (lines=14) @@ | ||
140 | * |
|
141 | * @return Response |
|
142 | */ |
|
143 | protected function with(array $parameters): self |
|
144 | { |
|
145 | $defaults = [ |
|
146 | 'statusCode' => $this->statusCode, |
|
147 | 'reasonPhrase' => $this->reasonPhrase, |
|
148 | 'protocolVersion' => $this->protocolVersion, |
|
149 | 'headers' => $this->headers, |
|
150 | 'body' => $this->body, |
|
151 | ]; |
|
152 | ||
153 | $arguments = array_values(array_replace($defaults, $parameters, ['__previous' => $this])); |
|
154 | ||
155 | return new static(...$arguments); |
|
156 | } |
|
157 | } |
|
158 |