PluginProbe
Media Cloud Sync / 1.4.2
Media Cloud Sync v1.4.2
1.4.2 1.4.1 1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 All 36 releases
← All changes | includes/sdk/google/guzzlehttp/psr7/src/Header.php +8 -8 1.0.2 → 1.4.2 View file →
@@ -1,8 +1,8 @@
1 1 <?php
2 2
3 3 declare (strict_types=1);
4 -namespace Dudlewebs\WPMCS\GuzzleHttp\Psr7;
4 +namespace Dudlewebs\WPMCS\GCP\GuzzleHttp\Psr7;
5 5
6 6 final class Header
7 7 {
8 8 /**
@@ -12,9 +12,9 @@
12 12 * contains a key, this function will inject a key with a '' string value.
13 13 *
14 14 * @param string|array $header Header to parse into components.
15 15 */
16 - public static function parse($header): array
16 + public static function parse($header) : array
17 17 {
18 18 static $trimmed = "\"' \n\t\r";
19 19 $params = $matches = [];
20 20 foreach ((array) $header as $value) {
@@ -19,15 +19,15 @@
19 19 $params = $matches = [];
20 20 foreach ((array) $header as $value) {
21 21 foreach (self::splitList($value) as $val) {
22 22 $part = [];
23 - foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) ?: [] as $kvp) {
24 - if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
23 + foreach (\preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) ?: [] as $kvp) {
24 + if (\preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
25 25 $m = $matches[0];
26 26 if (isset($m[1])) {
27 - $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed);
27 + $part[\trim($m[0], $trimmed)] = \trim($m[1], $trimmed);
28 28 } else {
29 - $part[] = trim($m[0], $trimmed);
29 + $part[] = \trim($m[0], $trimmed);
30 30 }
31 31 }
32 32 }
33 33 if ($part) {
@@ -44,9 +44,9 @@
44 44 * @param string|array $header Header to normalize.
45 45 *
46 46 * @deprecated Use self::splitList() instead.
47 47 */
48 - public static function normalize($header): array
48 + public static function normalize($header) : array
49 49 {
50 50 $result = [];
51 51 foreach ((array) $header as $value) {
52 52 foreach (self::splitList($value) as $parsed) {
@@ -67,9 +67,9 @@
67 67 * @param string|string[] $values Header value as returned by MessageInterface::getHeader()
68 68 *
69 69 * @return string[]
70 70 */
71 - public static function splitList($values): array
71 + public static function splitList($values) : array
72 72 {
73 73 if (!\is_array($values)) {
74 74 $values = [$values];
75 75 }