GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Branch master (645566)
by Jan
04:49
created
src/Gateway.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
      *
42 42
      * @return \Omnipay\FirstAtlanticCommerce\Message\AuthorizeRequest
43 43
      */
44
-    public function authorize(array $parameters = [])
44
+    public function authorize( array $parameters = [] )
45 45
     {
46
-        return $this->createRequest('\Omnipay\FirstAtlanticCommerce\Message\AuthorizeRequest', $parameters);
46
+        return $this->createRequest( '\Omnipay\FirstAtlanticCommerce\Message\AuthorizeRequest', $parameters );
47 47
     }
48 48
 
49 49
     /**
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
      *
54 54
      * @return \Omnipay\FirstAtlanticCommerce\Message\CaptureRequest
55 55
      */
56
-    public function capture(array $parameters = [])
56
+    public function capture( array $parameters = [] )
57 57
     {
58
-        return $this->createRequest('\Omnipay\FirstAtlanticCommerce\Message\CaptureRequest', $parameters);
58
+        return $this->createRequest( '\Omnipay\FirstAtlanticCommerce\Message\CaptureRequest', $parameters );
59 59
     }
60 60
 
61 61
     /**
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
      *
66 66
      * @return \Omnipay\FirstAtlanticCommerce\Message\PurchaseRequest
67 67
      */
68
-    public function purchase(array $parameters = [])
68
+    public function purchase( array $parameters = [] )
69 69
     {
70
-        return $this->createRequest('\Omnipay\FirstAtlanticCommerce\Message\PurchaseRequest', $parameters);
70
+        return $this->createRequest( '\Omnipay\FirstAtlanticCommerce\Message\PurchaseRequest', $parameters );
71 71
     }
72 72
 
73 73
     /**
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
      *
78 78
      * @return \Omnipay\FirstAtlanticCommerce\Message\RefundRequest
79 79
      */
80
-    public function refund(array $parameters = [])
80
+    public function refund( array $parameters = [] )
81 81
     {
82
-        return $this->createRequest('\Omnipay\FirstAtlanticCommerce\Message\RefundRequest', $parameters);
82
+        return $this->createRequest( '\Omnipay\FirstAtlanticCommerce\Message\RefundRequest', $parameters );
83 83
     }
84 84
 
85 85
     /**
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
      *
90 90
      * @return \Omnipay\FirstAtlanticCommerce\Message\VoidRequest
91 91
      */
92
-    public function void(array $parameters = [])
92
+    public function void( array $parameters = [] )
93 93
     {
94
-        return $this->createRequest('\Omnipay\FirstAtlanticCommerce\Message\VoidRequest', $parameters);
94
+        return $this->createRequest( '\Omnipay\FirstAtlanticCommerce\Message\VoidRequest', $parameters );
95 95
     }
96 96
 
97 97
     /**
@@ -101,9 +101,9 @@  discard block
 block discarded – undo
101 101
      *
102 102
      * @return \Omnipay\FirstAtlanticCommerce\Message\StatusRequest
103 103
      */
104
-    public function status(array $parameters = [])
104
+    public function status( array $parameters = [] )
105 105
     {
106
-        return $this->createRequest('\Omnipay\FirstAtlanticCommerce\Message\StatusRequest', $parameters);
106
+        return $this->createRequest( '\Omnipay\FirstAtlanticCommerce\Message\StatusRequest', $parameters );
107 107
     }
108 108
 
109 109
     /**
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
      *
114 114
      * @return \Omnipay\FirstAtlanticCommerce\Message\CreateCardRequest
115 115
      */
116
-    public function createCard(array $parameters = [])
116
+    public function createCard( array $parameters = [] )
117 117
     {
118
-        return $this->createRequest('\Omnipay\FirstAtlanticCommerce\Message\CreateCardRequest', $parameters);
118
+        return $this->createRequest( '\Omnipay\FirstAtlanticCommerce\Message\CreateCardRequest', $parameters );
119 119
     }
120 120
 
121 121
     /**
@@ -125,8 +125,8 @@  discard block
 block discarded – undo
125 125
      *
126 126
      * @return \Omnipay\FirstAtlanticCommerce\Message\UpdateCardRequest
127 127
      */
128
-    public function updateCard(array $parameters = [])
128
+    public function updateCard( array $parameters = [] )
129 129
     {
130
-        return $this->createRequest('\Omnipay\FirstAtlanticCommerce\Message\UpdateCardRequest', $parameters);
130
+        return $this->createRequest( '\Omnipay\FirstAtlanticCommerce\Message\UpdateCardRequest', $parameters );
131 131
     }
132 132
 }
Please login to merge, or discard this patch.
src/CreditCard.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -22,26 +22,26 @@  discard block
 block discarded – undo
22 22
     {
23 23
         $parameters = func_get_args();
24 24
 
25
-        if ( count($parameters) == 0 )
25
+        if ( count( $parameters ) == 0 )
26 26
         {
27 27
             $parameters = ['number', 'cvv', 'expiryMonth', 'expiryYear'];
28 28
         }
29 29
 
30
-        foreach ($parameters as $key)
30
+        foreach ( $parameters as $key )
31 31
         {
32
-            $value = $this->parameters->get($key);
32
+            $value = $this->parameters->get( $key );
33 33
 
34 34
             if ( empty($value) )
35 35
             {
36
-                throw new InvalidCreditCardException("The $key parameter is required");
36
+                throw new InvalidCreditCardException( "The $key parameter is required" );
37 37
             }
38 38
         }
39 39
 
40 40
         if ( isset($parameters['expiryMonth']) && isset($parameters['expiryYear']) )
41 41
         {
42
-            if ( $this->getExpiryDate('Ym') < gmdate('Ym') )
42
+            if ( $this->getExpiryDate( 'Ym' ) < gmdate( 'Ym' ) )
43 43
             {
44
-                throw new InvalidCreditCardException('Card has expired');
44
+                throw new InvalidCreditCardException( 'Card has expired' );
45 45
             }
46 46
         }
47 47
 
@@ -49,12 +49,12 @@  discard block
 block discarded – undo
49 49
         {
50 50
             if ( !Helper::validateLuhn( $this->getNumber() ) )
51 51
             {
52
-                throw new InvalidCreditCardException('Card number is invalid');
52
+                throw new InvalidCreditCardException( 'Card number is invalid' );
53 53
             }
54 54
 
55 55
             if ( !is_null( $this->getNumber() ) && !preg_match( '/^\d{12,19}$/i', $this->getNumber() ) )
56 56
             {
57
-                throw new InvalidCreditCardException('Card number should have 12 to 19 digits');
57
+                throw new InvalidCreditCardException( 'Card number should have 12 to 19 digits' );
58 58
             }
59 59
         }
60 60
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         {
63 63
             if ( !is_null( $this->getCvv() ) && !preg_match( '/^\d{3,4}$/i', $this->getCvv() ) )
64 64
             {
65
-                throw new InvalidCreditCardException('Card CVV should have 3 to 4 digits');
65
+                throw new InvalidCreditCardException( 'Card CVV should have 3 to 4 digits' );
66 66
             }
67 67
         }
68 68
     }
Please login to merge, or discard this patch.
src/Message/AuthorizeRequest.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         $signature .= $this->formatAmount();
39 39
         $signature .= $this->getCurrencyNumeric();
40 40
 
41
-        return base64_encode( sha1($signature, true) );
41
+        return base64_encode( sha1( $signature, true ) );
42 42
     }
43 43
 
44 44
     /**
@@ -48,23 +48,23 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function getData()
50 50
     {
51
-        $this->validate('merchantId', 'merchantPassword', 'acquirerId', 'transactionId', 'amount', 'currency', 'card');
51
+        $this->validate( 'merchantId', 'merchantPassword', 'acquirerId', 'transactionId', 'amount', 'currency', 'card' );
52 52
 
53 53
         // Check for AVS and require billingAddress1 and billingPostcode
54 54
         if ( $this->getRequireAvsCheck() )
55 55
         {
56
-            $this->getCard()->validate('billingAddress1', 'billingPostcode');
56
+            $this->getCard()->validate( 'billingAddress1', 'billingPostcode' );
57 57
         }
58 58
 
59 59
         // Tokenized cards require the CVV and nothing else, token replaces the card number
60 60
         if ( $this->getCardReference() )
61 61
         {
62
-            $this->validate('cardReference');
63
-            $this->getCard()->validate('cvv', 'expiryMonth', 'expiryYear');
62
+            $this->validate( 'cardReference' );
63
+            $this->getCard()->validate( 'cvv', 'expiryMonth', 'expiryYear' );
64 64
 
65 65
             $cardDetails = [
66 66
                 'CardCVV2'       => $this->getCard()->getCvv(),
67
-                'CardExpiryDate' => $this->getCard()->getExpiryDate('my'),
67
+                'CardExpiryDate' => $this->getCard()->getExpiryDate( 'my' ),
68 68
                 'CardNumber'     => $this->getCardReference()
69 69
             ];
70 70
         }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
             $cardDetails = [
76 76
                 'CardCVV2'       => $this->getCard()->getCvv(),
77
-                'CardExpiryDate' => $this->getCard()->getExpiryDate('my'),
77
+                'CardExpiryDate' => $this->getCard()->getExpiryDate( 'my' ),
78 78
                 'CardNumber'     => $this->getCard()->getNumber(),
79 79
                 'IssueNumber'    => $this->getCard()->getIssueNumber()
80 80
             ];
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         // Only pass the StartDate if year/month are set otherwise it returns 1299
84 84
         if ( $this->getCard()->getStartYear() && $this->getCard()->getStartMonth() )
85 85
         {
86
-            $cardDetails['StartDate'] = $this->getCard()->getStartDate('my');
86
+            $cardDetails['StartDate'] = $this->getCard()->getStartDate( 'my' );
87 87
         }
88 88
 
89 89
         $transactionDetails = [
@@ -137,21 +137,21 @@  discard block
 block discarded – undo
137 137
     {
138 138
         $country = $this->getCard()->getCountry();
139 139
 
140
-        if ( !is_null($country) && !is_numeric($country) )
140
+        if ( !is_null( $country ) && !is_numeric( $country ) )
141 141
         {
142 142
             $iso3166 = new ISO3166;
143 143
 
144
-            if ( strlen($country) == 2 )
144
+            if ( strlen( $country ) == 2 )
145 145
             {
146
-                $country = $iso3166->getByAlpha2($country)['numeric'];
146
+                $country = $iso3166->getByAlpha2( $country )['numeric'];
147 147
             }
148
-            elseif ( strlen($country) == 3 )
148
+            elseif ( strlen( $country ) == 3 )
149 149
             {
150
-                $country = $iso3166->getByAlpha3($country)['numeric'];
150
+                $country = $iso3166->getByAlpha3( $country )['numeric'];
151 151
             }
152 152
             else
153 153
             {
154
-                throw new InvalidRequestException("The country parameter must be ISO 3166-1 numeric, aplha2 or alpha3.");
154
+                throw new InvalidRequestException( "The country parameter must be ISO 3166-1 numeric, aplha2 or alpha3." );
155 155
             }
156 156
         }
157 157
 
@@ -169,9 +169,9 @@  discard block
 block discarded – undo
169 169
     {
170 170
         $state = $this->getCard()->getState();
171 171
 
172
-        if ( strlen($state) != 2 )
172
+        if ( strlen( $state ) != 2 )
173 173
         {
174
-            throw new InvalidRequestException("The state must be a two character abbreviation.");
174
+            throw new InvalidRequestException( "The state must be a two character abbreviation." );
175 175
         }
176 176
 
177 177
         return $state;
@@ -189,9 +189,9 @@  discard block
 block discarded – undo
189 189
     {
190 190
         $postal = preg_replace( '/[\s\-]/', '', $this->getCard()->getPostcode() );
191 191
 
192
-        if ( preg_match('/[^a-z0-9]/i', $postal) )
192
+        if ( preg_match( '/[^a-z0-9]/i', $postal ) )
193 193
         {
194
-            throw new InvalidRequestException("The postal code must be alpha-numeric.");
194
+            throw new InvalidRequestException( "The postal code must be alpha-numeric." );
195 195
         }
196 196
 
197 197
         return $postal;
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
      */
205 205
     protected function getEndpoint()
206 206
     {
207
-        return parent::getEndpoint() . 'Authorize';
207
+        return parent::getEndpoint().'Authorize';
208 208
     }
209 209
 
210 210
     /**
@@ -224,8 +224,8 @@  discard block
 block discarded – undo
224 224
      *
225 225
      * @return AuthorizeResponse
226 226
      */
227
-    protected function newResponse($xml)
227
+    protected function newResponse( $xml )
228 228
     {
229
-        return new AuthorizeResponse($this, $xml);
229
+        return new AuthorizeResponse( $this, $xml );
230 230
     }
231 231
 }
Please login to merge, or discard this patch.
src/Message/CreateCardRequest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
         $signature .= $this->getMerchantId();
27 27
         $signature .= $this->getAcquirerId();
28 28
 
29
-        return base64_encode( sha1($signature, true) );
29
+        return base64_encode( sha1( $signature, true ) );
30 30
     }
31 31
 
32 32
     /**
@@ -36,13 +36,13 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function getData()
38 38
     {
39
-        $this->validate('merchantId', 'merchantPassword', 'acquirerId', 'customerReference', 'card');
39
+        $this->validate( 'merchantId', 'merchantPassword', 'acquirerId', 'customerReference', 'card' );
40 40
         $this->getCard()->validate();
41 41
 
42 42
         $data = [
43 43
             'CardNumber'        => $this->getCard()->getNumber(),
44 44
             'CustomerReference' => $this->getCustomerReference(),
45
-            'ExpiryDate'        => $this->getCard()->getExpiryDate('my'),
45
+            'ExpiryDate'        => $this->getCard()->getExpiryDate( 'my' ),
46 46
             'MerchantNumber'    => $this->getMerchantId(),
47 47
             'Signature'         => $this->generateSignature()
48 48
         ];
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function getCustomerReference()
59 59
     {
60
-        return $this->getParameter('customerReference');
60
+        return $this->getParameter( 'customerReference' );
61 61
     }
62 62
 
63 63
     /**
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
      *
66 66
      * @param string $value
67 67
      */
68
-    public function setCustomerReference($value)
68
+    public function setCustomerReference( $value )
69 69
     {
70
-        return $this->setParameter('customerReference', $value);
70
+        return $this->setParameter( 'customerReference', $value );
71 71
     }
72 72
 
73 73
     /**
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     protected function getEndpoint()
79 79
     {
80
-        return parent::getEndpoint() . 'Tokenize';
80
+        return parent::getEndpoint().'Tokenize';
81 81
     }
82 82
 
83 83
     /**
@@ -87,9 +87,9 @@  discard block
 block discarded – undo
87 87
      *
88 88
      * @return CreateCardResponse
89 89
      */
90
-    protected function newResponse($xml)
90
+    protected function newResponse( $xml )
91 91
     {
92
-        return new CreateCardResponse($this, $xml);
92
+        return new CreateCardResponse( $this, $xml );
93 93
     }
94 94
 
95 95
 }
Please login to merge, or discard this patch.
src/Message/TransactionModificationResponse.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      * @param RequestInterface $request
18 18
      * @param string $data
19 19
      */
20
-    public function __construct(RequestInterface $request, $data)
20
+    public function __construct( RequestInterface $request, $data )
21 21
     {
22 22
         if ( empty($data) )
23 23
         {
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
         }
26 26
 
27 27
         $this->request = $request;
28
-        $this->data    = $this->xmlDeserialize($data);
28
+        $this->data    = $this->xmlDeserialize( $data );
29 29
     }
30 30
 
31 31
     /**
Please login to merge, or discard this patch.
src/Message/AbstractResponse.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,20 +14,20 @@
 block discarded – undo
14 14
      *
15 15
      * @return array data
16 16
      */
17
-    protected function xmlDeserialize($xml)
17
+    protected function xmlDeserialize( $xml )
18 18
     {
19 19
         $array = [];
20 20
 
21
-        if (!$xml instanceof SimpleXMLElement)
21
+        if ( !$xml instanceof SimpleXMLElement )
22 22
         {
23
-            $xml = new SimpleXMLElement($xml);
23
+            $xml = new SimpleXMLElement( $xml );
24 24
         }
25 25
 
26
-        foreach ($xml->children() as $key => $child)
26
+        foreach ( $xml->children() as $key => $child )
27 27
         {
28 28
             $value = (string) $child;
29
-            $_children = $this->xmlDeserialize($child);
30
-            $_push = ( $_hasChild = ( count($_children) > 0 ) ) ? $_children : $value;
29
+            $_children = $this->xmlDeserialize( $child );
30
+            $_push = ($_hasChild = (count( $_children ) > 0)) ? $_children : $value;
31 31
 
32 32
             if ( $_hasChild && !empty($value) && $value !== '' )
33 33
             {
Please login to merge, or discard this patch.
src/Message/TransactionModificationRequest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public function getData()
30 30
     {
31
-        $this->validate('merchantId', 'merchantPassword', 'acquirerId', 'transactionId', 'amount');
31
+        $this->validate( 'merchantId', 'merchantPassword', 'acquirerId', 'transactionId', 'amount' );
32 32
 
33 33
         $data = [
34 34
             'AcquirerId'       => $this->getAcquirerId(),
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     protected function getEndpoint()
52 52
     {
53
-        return parent::getEndpoint() . 'TransactionModification';
53
+        return parent::getEndpoint().'TransactionModification';
54 54
     }
55 55
 
56 56
     /**
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
      *
71 71
      * @return ResponseInterface
72 72
      */
73
-    protected function newResponse($xml)
73
+    protected function newResponse( $xml )
74 74
     {
75
-        return new TransactionModificationResponse($this, $xml);
75
+        return new TransactionModificationResponse( $this, $xml );
76 76
     }
77 77
 }
Please login to merge, or discard this patch.
src/Message/AbstractRequest.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
     {
49 49
         $amount = $this->getAmount();
50 50
 
51
-        $amount = str_replace('.', '', $amount);
52
-        $amount = str_pad($amount, 12, '0', STR_PAD_LEFT);
51
+        $amount = str_replace( '.', '', $amount );
52
+        $amount = str_pad( $amount, 12, '0', STR_PAD_LEFT );
53 53
 
54 54
         return $amount;
55 55
     }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      *
72 72
      * @return ResponseInterface
73 73
      */
74
-    abstract protected function newResponse($xml);
74
+    abstract protected function newResponse( $xml );
75 75
 
76 76
     /**
77 77
      * Send the request payload
@@ -80,12 +80,12 @@  discard block
 block discarded – undo
80 80
      *
81 81
      * @return ResponseInterface
82 82
      */
83
-    public function sendData($data)
83
+    public function sendData( $data )
84 84
     {
85 85
         $httpResponse = $this->httpClient->post(
86 86
             $this->getEndpoint(),
87 87
             ['Content-Type' => 'text/xml; charset=utf-8'],
88
-            $this->xmlSerialize($data)
88
+            $this->xmlSerialize( $data )
89 89
         )->send();
90 90
 
91 91
         return $this->response = $this->newResponse( $httpResponse->xml() );
@@ -99,28 +99,28 @@  discard block
 block discarded – undo
99 99
      *
100 100
      * @return string XML
101 101
      */
102
-    protected function xmlSerialize($data, $xml = null)
102
+    protected function xmlSerialize( $data, $xml = null )
103 103
     {
104 104
         if ( !$xml instanceof SimpleXMLElement )
105 105
         {
106
-            $xml = new SimpleXMLElement('<'. $this->requestName .' xmlns="'. $this->namespace .'" />');
106
+            $xml = new SimpleXMLElement( '<'.$this->requestName.' xmlns="'.$this->namespace.'" />' );
107 107
         }
108 108
 
109
-        foreach ($data as $key => $value)
109
+        foreach ( $data as $key => $value )
110 110
         {
111 111
             if ( !isset($value) )
112 112
             {
113 113
                 continue;
114 114
             }
115 115
 
116
-            if ( is_array($value) )
116
+            if ( is_array( $value ) )
117 117
             {
118
-                $node = $xml->addChild($key);
119
-                $this->xmlSerialize($value, $node);
118
+                $node = $xml->addChild( $key );
119
+                $this->xmlSerialize( $value, $node );
120 120
             }
121 121
             else
122 122
             {
123
-                $xml->addChild($key, $value);
123
+                $xml->addChild( $key, $value );
124 124
             }
125 125
         }
126 126
 
@@ -134,13 +134,13 @@  discard block
 block discarded – undo
134 134
      *
135 135
      * @return AbstractRequest Provides a fluent interface
136 136
      */
137
-    public function setCard($value)
137
+    public function setCard( $value )
138 138
     {
139
-        if ($value && !$value instanceof CreditCard)
139
+        if ( $value && !$value instanceof CreditCard )
140 140
         {
141
-            $value = new CreditCard($value);
141
+            $value = new CreditCard( $value );
142 142
         }
143 143
 
144
-        return $this->setParameter('card', $value);
144
+        return $this->setParameter( 'card', $value );
145 145
     }
146 146
 }
Please login to merge, or discard this patch.
src/Message/UpdateCardResponse.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      * @param RequestInterface $request
18 18
      * @param string $data
19 19
      */
20
-    public function __construct(RequestInterface $request, $data)
20
+    public function __construct( RequestInterface $request, $data )
21 21
     {
22 22
         if ( empty($data) )
23 23
         {
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
         }
26 26
 
27 27
         $this->request = $request;
28
-        $this->data    = $this->xmlDeserialize($data);
28
+        $this->data    = $this->xmlDeserialize( $data );
29 29
     }
30 30
 
31 31
     /**
Please login to merge, or discard this patch.