Skip to content

Commit dc24b7a

Browse files
🐛 fix: Compatibility with PHP 7.x
1 parent 9935ea6 commit dc24b7a

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

src/Efi/ApiRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ public function __construct(?array $options = null)
3535
* @param string $method The HTTP method.
3636
* @param string $route The URL route.
3737
* @param array $body The request body.
38-
* @return mixed The response data.
38+
* @return The response data.
3939
* @throws EfiException If there is an EFI specific error.
4040
*/
41-
public function send(string $method, string $route, string $scope, array $body): mixed
41+
public function send(string $method, string $route, string $scope, array $body)
4242
{
4343
$this->loadAccessTokenFromCache();
4444

src/Efi/Auth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ private function initializeRequestOptions()
7070
*
7171
* @return mixed The response data.
7272
*/
73-
private function sendAuthorizationRequest(): mixed
73+
private function sendAuthorizationRequest()
7474
{
7575
return $this->request->send(
7676
$this->endpoints['ENDPOINTS']['authorize']['method'],

src/Efi/BaseModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __get(string $property)
3131
* @param string $property The name of the property.
3232
* @param mixed $value The value to set.
3333
*/
34-
public function __set(string $property, mixed $value)
34+
public function __set(string $property, $value)
3535
{
3636
if (property_exists($this, $property)) {
3737
$this->$property = $value;

src/Efi/CacheRetriever.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function get(string $key)
4242
* @param mixed $value The value to be cached.
4343
* @param int|null $ttl The time-to-live in seconds (optional).
4444
*/
45-
public function set(string $key, mixed $value, $ttl = null)
45+
public function set(string $key, $value, $ttl = null)
4646
{
4747
$cacheItem = $this->cache->getItem($key);
4848
$cacheItem->set($value);

src/Efi/Exception/EfiException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class EfiException extends Exception
2323
* @param mixed $exception The original exception or error response.
2424
* @param int $code The error code.
2525
*/
26-
public function __construct($api, mixed $exception, int $code)
26+
public function __construct($api, $exception, int $code)
2727
{
2828
$error = $exception;
2929

src/Efi/Request.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ private function checkCertificateExpiration(string $validToTime): void
170170
* @throws EfiException If there is an EFI Pay specific error.
171171
*/
172172

173-
public function send(string $method, string $route, array $requestOptions): mixed
173+
public function send(string $method, string $route, array $requestOptions)
174174
{
175175
try {
176176
$this->applyCertificateAndHeaders($requestOptions);
@@ -226,7 +226,7 @@ private function mergeHeaders(array $requestOptions, array $defaultHeaders): arr
226226
* @return mixed The processed response data.
227227
*/
228228

229-
private function processResponse(mixed $response): mixed
229+
private function processResponse($response)
230230
{
231231
$headersResponse = $response->getHeader('Content-Type');
232232

0 commit comments

Comments
 (0)