Skip to content

Commit

Permalink
Supports PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
siarheipashkevich committed Nov 26, 2024
1 parent bb5c987 commit a98396a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
run: composer install --no-interaction --no-progress

- name: Execute tests
run: vendor/bin/phpunit --verbose
run: vendor/bin/phpunit
1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
backupStaticAttributes="false"
colors="true"
verbose="true"
convertDeprecationsToExceptions="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
Expand Down
6 changes: 3 additions & 3 deletions src/Loyverse.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ class Loyverse
/**
* Loyverse constructor.
*
* @param null $apiKey
* @param string|null $apiKey
* @param Client|null $guzzle
*/
public function __construct($apiKey = null, Client $guzzle = null)
public function __construct(?string $apiKey = null, ?Client $guzzle = null)
{
if (!is_null($apiKey)) {
$this->setApiKey($apiKey, $guzzle);
Expand Down Expand Up @@ -90,7 +90,7 @@ protected function transformCollection(array $collection, string $class, array $
* @param Client|null $guzzle
* @return $this
*/
public function setApiKey(string $apiKey, $guzzle = null): self
public function setApiKey(string $apiKey, ?Client $guzzle = null): self
{
$this->apiKey = $apiKey;

Expand Down
3 changes: 2 additions & 1 deletion src/Resources/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*
* @package Pashkevich\Loyverse\Resources
*/
#[\AllowDynamicProperties]
class Resource
{
/**
Expand All @@ -31,7 +32,7 @@ class Resource
* @param array $attributes
* @param Loyverse|null $loyverse
*/
public function __construct(array $attributes, Loyverse $loyverse = null)
public function __construct(array $attributes, ?Loyverse $loyverse = null)
{
$this->attributes = $attributes;
$this->loyverse = $loyverse;
Expand Down

0 comments on commit a98396a

Please sign in to comment.