Skip to content

Commit ccfffb5

Browse files
committed
Updated to new CS rules
1 parent 783443a commit ccfffb5

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/BasicAuthorizationHeaderMiddleware.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ public function pre(
3535
return resolve($request);
3636
}
3737

38-
if (!array_key_exists(Options::PASSWORD, $options[self::class])) {
38+
if (!\array_key_exists(Options::PASSWORD, $options[self::class])) {
3939
$options[self::class][Options::PASSWORD] = '';
4040
}
4141

4242
return resolve(
4343
$request->withAddedHeader(
4444
'Authorization',
45-
sprintf(
45+
\sprintf(
4646
'Basic %s',
47-
base64_encode(
47+
\base64_encode(
4848
$options[self::class][Options::USERNAME] . ':' .
4949
$options[self::class][Options::PASSWORD]
5050
)

tests/BasicAuthorizationHeaderMiddlewareTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
use RingCentral\Psr7\Request;
1010
use function Clue\React\Block\await;
1111

12+
/**
13+
* @internal
14+
*/
1215
final class BasicAuthorizationHeaderMiddlewareTest extends TestCase
1316
{
1417
public function preProvider()
@@ -63,7 +66,7 @@ public function preProvider()
6366
/**
6467
* @dataProvider preProvider
6568
*/
66-
public function testPre(array $options, bool $hasHeader, string $expectedHeader)
69+
public function testPre(array $options, bool $hasHeader, string $expectedHeader): void
6770
{
6871
$request = new Request('GET', 'https://example.com/');
6972
$middleware = new BasicAuthorizationHeaderMiddleware();

0 commit comments

Comments
 (0)