Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit 4cc56e3

Browse files
committed
🚿
1 parent b8939b0 commit 4cc56e3

11 files changed

+19
-21
lines changed

tests/ChillerlanHttpClientFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use chillerlan\HTTP\Psr18\CurlClient;
1515
use Psr\Http\Client\ClientInterface;
1616

17-
class ChillerlanHttpClientFactory implements OAuthTestHttpClientFactoryInterface{
17+
final class ChillerlanHttpClientFactory implements OAuthTestHttpClientFactoryInterface{
1818

1919
/**
2020
* @inheritDoc

tests/Core/AccessTokenTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
use function sleep, time;
1616

17-
class AccessTokenTest extends TestCase{
17+
final class AccessTokenTest extends TestCase{
1818

19-
protected AccessToken $token;
19+
private AccessToken $token;
2020

2121
protected function setUp():void{
2222
$this->token = new AccessToken;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Class GuzzleClientFactory
3+
* Class GuzzleHttpClientFactory
44
*
55
* requires Guzzle >= 7.3 (and Guzzle PSR-7 >= 2.0 for the PSR-17 factories)
66
*
@@ -17,7 +17,7 @@
1717
use GuzzleHttp\Client;
1818
use Psr\Http\Client\ClientInterface;
1919

20-
class GuzzleClientFactory implements OAuthTestHttpClientFactoryInterface{
20+
final class GuzzleHttpClientFactory implements OAuthTestHttpClientFactoryInterface{
2121

2222
public static function getClient(string $cfgdir):ClientInterface{
2323
return new Client([

tests/MagicAPI/EndpointDocblock.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818

1919
use const JSON_PRETTY_PRINT, PHP_EOL;
2020

21-
class EndpointDocblock{
21+
final class EndpointDocblock{
2222

23-
protected OAuthInterface $provider;
23+
private OAuthInterface $provider;
2424

25-
protected EndpointMapInterface $endpointMap;
25+
private EndpointMapInterface $endpointMap;
2626

2727
/**
2828
* EndpointDocblock constructor.

tests/OAuthTestHttpClient.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,15 @@
1010

1111
namespace chillerlan\OAuthTest;
1212

13-
use Psr\Http\Client\ClientExceptionInterface;
14-
use Psr\Http\Client\ClientInterface;
13+
use Psr\Http\Client\{ClientExceptionInterface, ClientInterface};
1514
use Psr\Http\Message\{RequestInterface, ResponseInterface};
1615
use Psr\Log\{LoggerAwareInterface, LoggerAwareTrait, LoggerInterface, NullLogger};
1716
use Exception, Throwable;
1817

1918
use function chillerlan\HTTP\Utils\message_to_string;
2019
use function constant, defined, get_class, usleep;
2120

22-
class OAuthTestHttpClient implements ClientInterface, LoggerAwareInterface{
21+
final class OAuthTestHttpClient implements ClientInterface, LoggerAwareInterface{
2322
use LoggerAwareTrait;
2423

2524
protected ClientInterface $http;

tests/OAuthTestLogger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
use function array_key_exists, date, sprintf, str_repeat, str_replace, strtolower, substr, trim, var_export;
1717

18-
class OAuthTestLogger extends AbstractLogger{
18+
final class OAuthTestLogger extends AbstractLogger{
1919

2020
protected const E_NONE = 0x00;
2121
protected const E_DEBUG = 0x01;

tests/OAuthTestMemoryStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
use function file_exists, file_get_contents, file_put_contents;
1818

19-
class OAuthTestMemoryStorage extends MemoryStorage{
19+
final class OAuthTestMemoryStorage extends MemoryStorage{
2020

2121
protected string $storagepath;
2222

tests/Providers/ProviderTestAbstract.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
use Psr\Http\Message\{RequestFactoryInterface, ResponseFactoryInterface, StreamFactoryInterface, UriFactoryInterface};
1515
use chillerlan\OAuth\Core\OAuthInterface;
1616
use chillerlan\OAuth\OAuthOptions;
17-
use chillerlan\OAuth\Storage\MemoryStorage;
18-
use chillerlan\OAuth\Storage\OAuthStorageInterface;
17+
use chillerlan\OAuth\Storage\{MemoryStorage, OAuthStorageInterface};
1918
use chillerlan\OAuthTest\OAuthTestLogger;
2019
use chillerlan\Settings\SettingsContainerInterface;
2120
use PHPUnit\Framework\TestCase;

tests/Providers/ProviderTestHttpClient.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
/**
1919
* a dummy client that returns a prepared set of responses
2020
*/
21-
class ProviderTestHttpClient implements ClientInterface{
21+
final class ProviderTestHttpClient implements ClientInterface{
2222

23-
protected array $responses;
24-
protected ResponseFactoryInterface $responseFactory;
25-
protected StreamFactoryInterface $streamFactory;
23+
private array $responses;
24+
private ResponseFactoryInterface $responseFactory;
25+
private StreamFactoryInterface $streamFactory;
2626

2727
public function __construct(
2828
array $responses,

tests/Providers/RequestTest/RequestTestProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use chillerlan\OAuthTest\Providers\TestEndpoints;
1515
use Psr\Http\Message\{RequestInterface, UriInterface};
1616

17-
class RequestTestProvider extends OAuthProvider{
17+
final class RequestTestProvider extends OAuthProvider{
1818

1919
protected ?string $apiURL = 'https://localhost';
2020
protected ?string $endpointMap = TestEndpoints::class;

0 commit comments

Comments
 (0)