@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | : $resource |
56 | 56 | ); |
57 | 57 | |
58 | - if (! \is_array($parsedUrl) || ! \array_key_exists('host', $parsedUrl)) { |
|
58 | + if (!\is_array($parsedUrl) || !\array_key_exists('host', $parsedUrl)) { |
|
59 | 59 | throw new RuntimeException('Unable to parse resource'); |
60 | 60 | } |
61 | 61 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $links = $data['links'] ?? []; |
80 | 80 | $href = null; |
81 | 81 | foreach ($links as $link) { |
82 | - if (! \is_array($link)) { |
|
82 | + if (!\is_array($link)) { |
|
83 | 83 | continue; |
84 | 84 | } |
85 | 85 | |
@@ -87,14 +87,14 @@ discard block |
||
87 | 87 | continue; |
88 | 88 | } |
89 | 89 | |
90 | - if (! \array_key_exists('href', $link)) { |
|
90 | + if (!\array_key_exists('href', $link)) { |
|
91 | 91 | continue; |
92 | 92 | } |
93 | 93 | |
94 | 94 | $href = $link['href']; |
95 | 95 | } |
96 | 96 | |
97 | - if (! \is_string($href) || 0 !== \strpos($href, 'https://')) { |
|
97 | + if (!\is_string($href) || 0 !== \strpos($href, 'https://')) { |
|
98 | 98 | throw new InvalidArgumentException('Invalid issuer location'); |
99 | 99 | } |
100 | 100 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | throw new RuntimeException('Unable to fetch provider metadata', 0, $e); |
145 | 145 | } |
146 | 146 | |
147 | - if (! \array_key_exists('issuer', $data)) { |
|
147 | + if (!\array_key_exists('issuer', $data)) { |
|
148 | 148 | throw new RuntimeException('Invalid metadata content, no "issuer" key found'); |
149 | 149 | } |
150 | 150 |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | */ |
12 | 12 | function normalize_webfinger(string $input): string |
13 | 13 | { |
14 | - $hasScheme = static function (string $resource): bool { |
|
14 | + $hasScheme = static function(string $resource): bool { |
|
15 | 15 | if (false !== \strpos($resource, '://')) { |
16 | 16 | return true; |
17 | 17 | } |
@@ -24,10 +24,10 @@ discard block |
||
24 | 24 | |
25 | 25 | $hostOrPort = \substr($resource, $index + 1); |
26 | 26 | |
27 | - return ! \preg_match('/^\d+$/', $hostOrPort); |
|
27 | + return !\preg_match('/^\d+$/', $hostOrPort); |
|
28 | 28 | }; |
29 | 29 | |
30 | - $acctSchemeAssumed = static function (string $input): bool { |
|
30 | + $acctSchemeAssumed = static function(string $input): bool { |
|
31 | 31 | if (false === \strpos($input, '@')) { |
32 | 32 | return false; |
33 | 33 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | /** @var string $host */ |
37 | 37 | $host = \array_pop($parts); |
38 | 38 | |
39 | - return ! \preg_match('/[:\/?]+/', $host); |
|
39 | + return !\preg_match('/[:\/?]+/', $host); |
|
40 | 40 | }; |
41 | 41 | |
42 | 42 | if ($hasScheme($input)) { |