Passed
Push — dev-master ( 881343...d3b935 )
by Petr
02:22
created
src/YourMembershipClient.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
      */
56 56
     private function createSession() : string
57 57
     {
58
-        $response =  $this->makeCall('Session.Create')->toObject();
58
+        $response = $this->makeCall('Session.Create')->toObject();
59 59
         return $response->SessionID;
60 60
 
61 61
     }
Please login to merge, or discard this patch.
src/Core/Request.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,11 +72,11 @@  discard block
 block discarded – undo
72 72
     {
73 73
         //Create Call Node
74 74
         $call = new \SimpleXMLElement('<Call> </Call>');
75
-        $call->addAttribute('Method',$method);
75
+        $call->addAttribute('Method', $method);
76 76
 
77 77
         //Add Arguments to the Call Node
78 78
         foreach ($arguments as $key => $value) {
79
-            $call->addChild($key,$value);
79
+            $call->addChild($key, $value);
80 80
         }
81 81
 
82 82
         return $call;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         $callPayload = $this->createCallPayload($method, $arguments); // Specific API Call Envelope
94 94
 
95 95
         // Put Api call into common envelope
96
-        $this->sxmlAppend($xml,$callPayload);
96
+        $this->sxmlAppend($xml, $callPayload);
97 97
 
98 98
         return $xml;
99 99
     }
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      * @param  SimpleXMLElement $from
140 140
      * @return void
141 141
      */
142
-    private function sxmlAppend(\SimpleXMLElement $to, \SimpleXMLElement $from)  {
142
+    private function sxmlAppend(\SimpleXMLElement $to, \SimpleXMLElement $from) {
143 143
         $toDom = dom_import_simplexml($to);
144 144
         $fromDom = dom_import_simplexml($from);
145 145
         $toDom->appendChild($toDom->ownerDocument->importNode($fromDom, true));
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -154,7 +154,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Core/YourMembershipException.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,13 +11,14 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Core/Response.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
     private $method;
11 11
     private $response;
12 12
 
13
-    public function __construct(string $method,  $response)
13
+    public function __construct(string $method, $response)
14 14
     {
15 15
         $this->method = $method;
16 16
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      */
53 53
     public function getError() : string
54 54
     {
55
-        return (string)$this->response->ErrDesc;
55
+        return (string) $this->response->ErrDesc;
56 56
     }
57 57
 
58 58
     /**
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
         if (isset($this->response->{$this->method}->Results)) {
116 116
             $attributes = $this->response->{$this->method}->Results->attributes();
117
-            $count  = (int) $attributes['ResultTotal'] ?? false;
117
+            $count = (int) $attributes['ResultTotal'] ?? false;
118 118
         }
119 119
 
120 120
         return $count;
Please login to merge, or discard this patch.
src/YourMembershipServiceProvider.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,8 @@
 block discarded – undo
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.
Please login to merge, or discard this patch.