Skip to content

Commit 80dd563

Browse files
committed
Make internal classes final
1 parent 8667b29 commit 80dd563

File tree

13 files changed

+37
-36
lines changed

13 files changed

+37
-36
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
'concat_space' => [
1818
'spacing' => 'none',
1919
],
20+
'final_internal_class' => true,
2021
'fully_qualified_strict_types' => [
2122
'import_symbols' => true,
2223
'leading_backslash_in_global_namespace' => true,

src/Firebase/Auth/ApiClient.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,23 @@
3131
/**
3232
* @internal
3333
*/
34-
class ApiClient
34+
final readonly class ApiClient
3535
{
36-
private readonly ProjectAwareAuthResourceUrlBuilder|TenantAwareAuthResourceUrlBuilder $awareAuthResourceUrlBuilder;
36+
private ProjectAwareAuthResourceUrlBuilder|TenantAwareAuthResourceUrlBuilder $awareAuthResourceUrlBuilder;
3737

38-
private readonly AuthResourceUrlBuilder $authResourceUrlBuilder;
38+
private AuthResourceUrlBuilder $authResourceUrlBuilder;
3939

4040
/**
4141
* @param non-empty-string $projectId
4242
* @param non-empty-string|null $tenantId
4343
*/
4444
public function __construct(
45-
private readonly string $projectId,
46-
private readonly ?string $tenantId,
47-
private readonly ClientInterface $client,
48-
private readonly GuzzleHandler $signInHandler,
49-
private readonly ClockInterface $clock,
50-
private readonly AuthApiExceptionConverter $errorHandler,
45+
private string $projectId,
46+
private ?string $tenantId,
47+
private ClientInterface $client,
48+
private GuzzleHandler $signInHandler,
49+
private ClockInterface $clock,
50+
private AuthApiExceptionConverter $errorHandler,
5151
) {
5252
$this->awareAuthResourceUrlBuilder = $tenantId !== null
5353
? TenantAwareAuthResourceUrlBuilder::forProjectAndTenant($projectId, $tenantId)

src/Firebase/Database/ApiClient.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
/**
1818
* @internal
1919
*/
20-
class ApiClient
20+
final readonly class ApiClient
2121
{
2222
public function __construct(
23-
private readonly ClientInterface $client,
24-
private readonly UrlBuilder $resourceUrlBuilder,
25-
private readonly DatabaseApiExceptionConverter $errorHandler,
23+
private ClientInterface $client,
24+
private UrlBuilder $resourceUrlBuilder,
25+
private DatabaseApiExceptionConverter $errorHandler,
2626
) {
2727
}
2828

src/Firebase/Database/Query/Filter/Shallow.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/**
1212
* @internal
1313
*/
14-
final class Shallow implements Filter
14+
final readonly class Shallow implements Filter
1515
{
1616
use ModifierTrait;
1717

src/Firebase/Database/Query/Sorter/OrderByKey.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/**
1515
* @internal
1616
*/
17-
final class OrderByKey implements Sorter
17+
final readonly class OrderByKey implements Sorter
1818
{
1919
use ModifierTrait;
2020

src/Firebase/Database/Query/Sorter/OrderByValue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/**
1515
* @internal
1616
*/
17-
final class OrderByValue implements Sorter
17+
final readonly class OrderByValue implements Sorter
1818
{
1919
use ModifierTrait;
2020

src/Firebase/Exception/AuthApiExceptionConverter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
/**
3131
* @internal
3232
*/
33-
class AuthApiExceptionConverter
33+
final readonly class AuthApiExceptionConverter
3434
{
35-
public function __construct(private readonly ErrorResponseParser $responseParser)
35+
public function __construct(private ErrorResponseParser $responseParser)
3636
{
3737
}
3838

src/Firebase/Exception/DatabaseApiExceptionConverter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
/**
1919
* @internal
2020
*/
21-
class DatabaseApiExceptionConverter
21+
final readonly class DatabaseApiExceptionConverter
2222
{
23-
public function __construct(private readonly ErrorResponseParser $responseParser)
23+
public function __construct(private ErrorResponseParser $responseParser)
2424
{
2525
}
2626

src/Firebase/Exception/MessagingApiExceptionConverter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
/**
2929
* @internal
3030
*/
31-
class MessagingApiExceptionConverter
31+
final readonly class MessagingApiExceptionConverter
3232
{
33-
private readonly ErrorResponseParser $responseParser;
33+
private ErrorResponseParser $responseParser;
3434

35-
private readonly ClockInterface $clock;
35+
private ClockInterface $clock;
3636

3737
public function __construct(?ClockInterface $clock = null)
3838
{

src/Firebase/Exception/RemoteConfigApiExceptionConverter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
/**
2121
* @internal
2222
*/
23-
class RemoteConfigApiExceptionConverter
23+
final readonly class RemoteConfigApiExceptionConverter
2424
{
25-
public function __construct(private readonly ErrorResponseParser $responseParser)
25+
public function __construct(private ErrorResponseParser $responseParser)
2626
{
2727
}
2828

0 commit comments

Comments
 (0)