Skip to content

Commit 9e12e4f

Browse files
authored
Merge pull request #227 from patrickbrouwers/patch-1
Fix PHP 8: Required parameter $endpoint follows optional parameter $method
2 parents 2e0cd08 + 95797f9 commit 9e12e4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Picqer/Financials/Moneybird/Connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public function connect()
158158
* @return \GuzzleHttp\Psr7\Request
159159
* @throws \Picqer\Financials\Moneybird\Exceptions\ApiException
160160
*/
161-
private function createRequest($method = 'GET', $endpoint, $body = null, array $params = [], array $headers = [])
161+
private function createRequest($method = 'GET', $endpoint = '', $body = null, array $params = [], array $headers = [])
162162
{
163163
// Add default json headers to the request
164164
$headers = array_merge($headers, [
@@ -197,7 +197,7 @@ private function createRequest($method = 'GET', $endpoint, $body = null, array $
197197
* @return \GuzzleHttp\Psr7\Request
198198
* @throws \Picqer\Financials\Moneybird\Exceptions\ApiException
199199
*/
200-
private function createRequestNoJson($method = 'GET', $endpoint, $body = null, array $params = [], array $headers = [])
200+
private function createRequestNoJson($method = 'GET', $endpoint = '', $body = null, array $params = [], array $headers = [])
201201
{
202202
// If access token is not set or token has expired, acquire new token
203203
if (empty($this->accessToken)) {

0 commit comments

Comments
 (0)