File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/Picqer/Financials/Moneybird Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -414,7 +414,7 @@ public function needsAuthentication()
414414 private function parseResponse (Response $ response )
415415 {
416416 try {
417- Psr7 \rewind_body ($ response );
417+ Psr7 \Message:: rewindBody ($ response );
418418 $ json = json_decode ($ response ->getBody ()->getContents (), true );
419419
420420 return $ json ;
@@ -477,7 +477,7 @@ private function acquireAccessToken()
477477 $ response = $ this ->client ()->post ($ this ->getTokenUrl (), $ body );
478478
479479 if ($ response ->getStatusCode () == 200 ) {
480- Psr7 \rewind_body ($ response );
480+ Psr7 \Message:: rewindBody ($ response );
481481 $ body = json_decode ($ response ->getBody ()->getContents (), true );
482482
483483 if (json_last_error () === JSON_ERROR_NONE ) {
@@ -512,7 +512,7 @@ private function parseExceptionForErrorMessages(Exception $exception)
512512 return new ApiException ('Response is NULL. ' , 0 , $ exception );
513513 }
514514
515- Psr7 \rewind_body ($ response );
515+ Psr7 \Message:: rewindBody ($ response );
516516 $ responseBody = $ response ->getBody ()->getContents ();
517517 $ decodedResponseBody = json_decode ($ responseBody , true );
518518
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ public function testClientTriesToGetAccessTokenWhenNoneGiven()
112112 $ request = $ this ->getRequestFromHistoryContainer ();
113113 $ this ->assertEquals ('POST ' , $ request ->getMethod ());
114114
115- Psr7 \rewind_body ($ request );
115+ Psr7 \Message:: rewindBody ($ request );
116116 $ this ->assertEquals (
117117 'redirect_uri=testRedirectUrl&grant_type=authorization_code&client_id=testClientId&client_secret=testClientSecret&code=testAuthorizationCode ' ,
118118 $ request ->getBody ()->getContents ()
You can’t perform that action at this time.
0 commit comments