@@ -6,7 +6,8 @@ discard block |
||
| 6 | 6 | use P2A\YourMembership\Core\Request; |
| 7 | 7 | use P2A\YourMembership\Core\Response; |
| 8 | 8 | |
| 9 | -class YourMembershipClient { |
|
| 9 | +class YourMembershipClient |
|
| 10 | +{ |
|
| 10 | 11 | |
| 11 | 12 | /** |
| 12 | 13 | * Guzzle Client |
@@ -36,7 +37,8 @@ discard block |
||
| 36 | 37 | * @param array $arguments Your Membership API Call Arguments |
| 37 | 38 | * @return Response |
| 38 | 39 | */ |
| 39 | - public function makeCall(string $method, array $arguments = []) { |
|
| 40 | + public function makeCall(string $method, array $arguments = []) |
|
| 41 | + { |
|
| 40 | 42 | |
| 41 | 43 | Request::$callId++; //Update the Call ID as they need to be unique per call |
| 42 | 44 | $request = $this->request->buildRequest($method, $arguments); |
@@ -11,13 +11,14 @@ |
||
| 11 | 11 | { |
| 12 | 12 | private $apiMethod; |
| 13 | 13 | |
| 14 | - public function __construct(string $message, int $code = 0, string $apiMethod) |
|
| 14 | + public function __construct(string $message, int $code = 0, string $apiMethod) |
|
| 15 | 15 | { |
| 16 | 16 | $this->apiMethod = $apiMethod; |
| 17 | 17 | parent::__construct($message, $code, null); |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | - public function __toString() { |
|
| 20 | + public function __toString() |
|
| 21 | + { |
|
| 21 | 22 | return __CLASS__ . ": [{$this->apiMethod}]: {$this->message}\n"; |
| 22 | 23 | } |
| 23 | 24 | |
@@ -154,7 +154,8 @@ discard block |
||
| 154 | 154 | * @param SimpleXMLElement $from |
| 155 | 155 | * @return void |
| 156 | 156 | */ |
| 157 | - private function sxmlAppend(\SimpleXMLElement $to, \SimpleXMLElement $from) { |
|
| 157 | + private function sxmlAppend(\SimpleXMLElement $to, \SimpleXMLElement $from) |
|
| 158 | + { |
|
| 158 | 159 | $toDom = dom_import_simplexml($to); |
| 159 | 160 | $fromDom = dom_import_simplexml($from); |
| 160 | 161 | $toDom->appendChild($toDom->ownerDocument->importNode($fromDom, true)); |
@@ -193,7 +194,8 @@ discard block |
||
| 193 | 194 | * @date 2017-01-11 |
| 194 | 195 | * @return boolean |
| 195 | 196 | */ |
| 196 | - public function hasSession() { |
|
| 197 | + public function hasSession() |
|
| 198 | + { |
|
| 197 | 199 | return !is_null(self::$sessionId); |
| 198 | 200 | } |
| 199 | 201 | |
@@ -3,7 +3,8 @@ |
||
| 3 | 3 | |
| 4 | 4 | use Illuminate\Support\ServiceProvider; |
| 5 | 5 | |
| 6 | -class YourMembershipServiceProvider extends ServiceProvider { |
|
| 6 | +class YourMembershipServiceProvider extends ServiceProvider |
|
| 7 | +{ |
|
| 7 | 8 | |
| 8 | 9 | /** |
| 9 | 10 | * Indicates if loading of the provider is deferred. |