@@ -238,9 +238,9 @@ Returns all uploaded files in a normalized array structure. For the above exampl
238238
239239``` php
240240[
241- 'attachment' => object(Laminas\Diactoros\UploadedFile) {
242- // ...
243- }
241+ 'attachment' => object(Laminas\Diactoros\UploadedFile) {
242+ // ...
243+ }
244244]
245245```
246246
@@ -258,14 +258,14 @@ $files = [
258258 $size,
259259 $errorStatus,
260260 $clientFilename,
261- $clientMediaType
261+ $clientMediaType,
262262 ),
263263 'anotherAttachment' => new \Laminas\Diactoros\UploadedFile(
264264 '/tmp/hfz6dbn.tmp',
265265 123,
266266 \UPLOAD_ERR_OK,
267267 'attachment.txt',
268- 'text/plain'
268+ 'text/plain',
269269 ),
270270 ],
271271];
@@ -411,34 +411,34 @@ Some examples would be:
411411// Add an environment detector.
412412$this->request->addDetector(
413413 'post',
414- ['env' => 'REQUEST_METHOD', 'value' => 'POST']
414+ ['env' => 'REQUEST_METHOD', 'value' => 'POST'],
415415);
416416
417417// Add a pattern value detector.
418418$this->request->addDetector(
419419 'iphone',
420- ['env' => 'HTTP_USER_AGENT', 'pattern' => '/iPhone/i']
420+ ['env' => 'HTTP_USER_AGENT', 'pattern' => '/iPhone/i'],
421421);
422422
423423// Add an option detector
424424$this->request->addDetector('internalIp', [
425425 'env' => 'CLIENT_IP',
426- 'options' => ['192.168.0.101', '192.168.0.100']
426+ 'options' => ['192.168.0.101', '192.168.0.100'],
427427]);
428428
429429
430430// Add a header detector with value comparison
431431$this->request->addDetector('fancy', [
432432 'env' => 'CLIENT_IP',
433- 'header' => ['X-Fancy' => 1]
433+ 'header' => ['X-Fancy' => 1],
434434]);
435435
436436// Add a header detector with callable comparison
437437$this->request->addDetector('fancy', [
438438 'env' => 'CLIENT_IP',
439439 'header' => ['X-Fancy' => function ($value, $header) {
440440 return in_array($value, ['1', '0', 'yes', 'no'], true);
441- }]
441+ }],
442442]);
443443
444444// Add a callback detector. Must be a valid callable.
@@ -782,7 +782,7 @@ the browser by specifying the options:
782782``` php
783783$response = $this->response->withFile(
784784 $file['path'],
785- ['download' => true, 'name' => 'foo']
785+ ['download' => true, 'name' => 'foo'],
786786);
787787```
788788
@@ -1149,7 +1149,7 @@ $this->response = $this->response->withCookie(Cookie::create(
11491149 'domain' => '',
11501150 'secure' => false,
11511151 'httponly' => false,
1152- 'samesite' => null // Or one of CookieInterface::SAMESITE_* constants
1152+ 'samesite' => null, // Or one of CookieInterface::SAMESITE_* constants
11531153 ]
11541154));
11551155```
@@ -1273,7 +1273,7 @@ class CorsMiddleware implements MiddlewareInterface
12731273{
12741274 public function process(
12751275 ServerRequestInterface $request,
1276- RequestHandlerInterface $handler
1276+ RequestHandlerInterface $handler,
12771277 ): ResponseInterface {
12781278 // Handle preflight requests
12791279 if ($request->getMethod() === 'OPTIONS') {
@@ -1385,7 +1385,7 @@ $cookie = new Cookie(
13851385 '/', // path, if applicable
13861386 'example.com', // domain, if applicable
13871387 false, // secure only?
1388- true // http only ?
1388+ true, // http only ?
13891389);
13901390
13911391// Using the builder methods
0 commit comments