Skip to content

Commit

Permalink
🧱 remove final keyword from classes to allow mocking in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
devmoath committed Feb 7, 2023
1 parent 7d843b2 commit 6a9151f
Show file tree
Hide file tree
Showing 17 changed files with 18 additions and 16 deletions.
2 changes: 2 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\CodingStyle\Rector\Encapsed\WrapEncapsedVariableInCurlyBracesRector;
use Rector\Config\RectorConfig;
use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;

Expand All @@ -28,5 +29,6 @@
$rectorConfig->skip([
EncapsedStringsToSprintfRector::class,
WrapEncapsedVariableInCurlyBracesRector::class,
FinalizeClassesWithoutChildrenRector::class,
]);
};
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Jira\Resources\Requests;
use Jira\Resources\Users;

final class Client
class Client
{
public function __construct(private readonly Transporter $transporter)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/ErrorException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* @internal
*/
final class ErrorException extends Exception
class ErrorException extends Exception
{
//
}
2 changes: 1 addition & 1 deletion src/Exceptions/TransporterException.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* @internal
*/
final class TransporterException extends Exception
class TransporterException extends Exception
{
public function __construct(ClientExceptionInterface $clientException)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/UnserializableResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* @internal
*/
final class UnserializableResponse extends Exception
class UnserializableResponse extends Exception
{
public function __construct(JsonException $jsonException)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Jira.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Jira\ValueObjects\Transporter\BaseUri;
use Jira\ValueObjects\Transporter\Headers;

final class Jira
class Jira
{
public static function client(string $username, string $password, string $host): Client
{
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/Attachments.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Jira\Enums\Transporter\Method;
use Jira\ValueObjects\Transporter\Payload;

final class Attachments
class Attachments
{
use Concerns\Transportable;

Expand Down
2 changes: 1 addition & 1 deletion src/Resources/Customers.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Jira\Enums\Transporter\Method;
use Jira\ValueObjects\Transporter\Payload;

final class Customers
class Customers
{
use Concerns\Transportable;

Expand Down
2 changes: 1 addition & 1 deletion src/Resources/Groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Jira\Enums\Transporter\Method;
use Jira\ValueObjects\Transporter\Payload;

final class Groups
class Groups
{
use Concerns\Transportable;

Expand Down
2 changes: 1 addition & 1 deletion src/Resources/Issues.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Jira\Enums\Transporter\Method;
use Jira\ValueObjects\Transporter\Payload;

final class Issues
class Issues
{
use Concerns\Transportable;

Expand Down
2 changes: 1 addition & 1 deletion src/Resources/Requests.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Jira\Enums\Transporter\Method;
use Jira\ValueObjects\Transporter\Payload;

final class Requests
class Requests
{
use Concerns\Transportable;

Expand Down
2 changes: 1 addition & 1 deletion src/Resources/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Jira\Enums\Transporter\Method;
use Jira\ValueObjects\Transporter\Payload;

final class Users
class Users
{
use Concerns\Transportable;

Expand Down
2 changes: 1 addition & 1 deletion src/Transporters/HttpTransporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/**
* @internal
*/
final class HttpTransporter implements Transporter
class HttpTransporter implements Transporter
{
public function __construct(
private readonly ClientInterface $client,
Expand Down
2 changes: 1 addition & 1 deletion src/ValueObjects/BasicAuthentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Stringable;

final class BasicAuthentication implements Stringable
class BasicAuthentication implements Stringable
{
private function __construct(private readonly string $username, private readonly string $password)
{
Expand Down
2 changes: 1 addition & 1 deletion src/ValueObjects/Transporter/BaseUri.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* @internal
*/
final class BaseUri implements Stringable
class BaseUri implements Stringable
{
private function __construct(private readonly string $baseUri)
{
Expand Down
2 changes: 1 addition & 1 deletion src/ValueObjects/Transporter/Headers.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* @internal
*/
final class Headers
class Headers
{
/**
* Creates a new Headers value object.
Expand Down
2 changes: 1 addition & 1 deletion src/ValueObjects/Transporter/Payload.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* @internal
*/
final class Payload
class Payload
{
/**
* @param array<array-key, mixed> $body
Expand Down

0 comments on commit 6a9151f

Please sign in to comment.