Skip to content

Commit

Permalink
Constructor of BaseResource is now final
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonrietdijk committed Nov 30, 2022
1 parent 59e7709 commit 1935d33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/OData/BaseResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use SaintSystems\OData\Entity;
use SaintSystems\OData\ODataClient;

/** @phpstan-consistent-constructor */
abstract class BaseResource implements ArrayAccess, Arrayable
{
use HasData;
Expand All @@ -26,7 +25,7 @@ abstract class BaseResource implements ArrayAccess, Arrayable

public string $endpoint;

public function __construct(?string $connection = null, ?string $endpoint = null)
final public function __construct(?string $connection = null, ?string $endpoint = null)
{
$this->connection ??= $connection ?? config('dynamics.connection');
$this->endpoint ??= $endpoint ?? config('dynamics.resources.'.static::class, Str::afterLast(static::class, '\\'));
Expand Down
5 changes: 1 addition & 4 deletions src/OData/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@

class Resource extends BaseResource
{
public function __construct(string $endpoint, ?string $connection = null)
{
parent::__construct($connection, $endpoint);
}
//
}

0 comments on commit 1935d33

Please sign in to comment.