|
@@ -346,7 +346,7 @@ discard block |
|
|
block discarded – undo |
|
346
|
346
|
if (empty($result['headers']['Allow'])) { |
|
347
|
347
|
throw new Error\Generic('Missing allow header'); |
|
348
|
348
|
} |
|
349
|
|
- $allow = array_map(function ($item) { |
|
|
349
|
+ $allow = array_map(function($item) { |
|
350
|
350
|
return trim($item); |
|
351
|
351
|
}, explode(',', $result['headers']['Allow'][0])); |
|
352
|
352
|
return (new Result(['success' => true, 'allow' => $allow]))->withRequestID($result['requestID']); |
|
@@ -494,7 +494,7 @@ discard block |
|
|
block discarded – undo |
|
494
|
494
|
$contentRange['page'] = $contentRange['links']['self']['params']['page']; |
|
495
|
495
|
$contentRange['pages'] = $contentRange['links']['last']['params']['page'] ?? 1; |
|
496
|
496
|
$contentRange['per_page'] = $contentRange['links']['self']['params']['per_page']; |
|
497
|
|
- $contentRange['from'] = $contentRange['per_page'] * ($contentRange['page'] -1) + 1; |
|
|
497
|
+ $contentRange['from'] = $contentRange['per_page'] * ($contentRange['page'] - 1) + 1; |
|
498
|
498
|
$contentRange['to'] = $contentRange['per_page'] * $contentRange['page']; |
|
499
|
499
|
} |
|
500
|
500
|
|
|
@@ -559,7 +559,7 @@ discard block |
|
|
block discarded – undo |
|
559
|
559
|
// see https://github.com/guzzle/psr7/blob/master/README.md#guzzlehttppsr7urinormalizernormalize |
|
560
|
560
|
return preg_replace_callback( |
|
561
|
561
|
'/%(?:2C|2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i', |
|
562
|
|
- function (array $match) { |
|
|
562
|
+ function(array $match) { |
|
563
|
563
|
return rawurldecode($match[0]); |
|
564
|
564
|
}, |
|
565
|
565
|
http_build_query($query) |