Skip to content

Commit

Permalink
Merge pull request #66 from academe/misc-fixes
Browse files Browse the repository at this point in the history
Misc fixes
  • Loading branch information
judgej authored Sep 19, 2023
2 parents 6fc770f + 8568d4b commit 6027cfb
Show file tree
Hide file tree
Showing 37 changed files with 57 additions and 35 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,8 @@ atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
crashlytics-build.properties

vendor
.phpunit.result.cache
composer.lock
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
language: php

php:
- 5.5
- 5.6
- 7.0
- 7.1
- 7.4
- 8.0
- 8.1
- 8.2

before_script:
- composer self-update
- composer install --no-interaction
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"guzzlehttp/guzzle": "^6.0|^7.0|^8.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.0"
"phpunit/phpunit": "^9.6",
"squizlabs/php_codesniffer": "^3.7"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 1 addition & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false">
stopOnFailure="false">
<testsuites>
<testsuite name="SagePay Pi Test Suite">
<directory suffix=".php">./tests/</directory>
Expand Down
1 change: 1 addition & 0 deletions src/Request/AbstractInstruction.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public function __construct(Endpoint $endpoint, Auth $auth, $transactionId)
* Get the message body data for serializing.
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
$body = [];
Expand Down
1 change: 1 addition & 0 deletions src/Request/CreateCardIdentifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public function getSecurityCode()
* Replace all card detail characters with asterisks.
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
$data = $this->jsonSerializePeek();
Expand Down
1 change: 1 addition & 0 deletions src/Request/CreatePayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ public function withReferrerId($referrerId)
* Get the message body data for serializing.
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
// The mandatory fields.
Expand Down
1 change: 1 addition & 0 deletions src/Request/CreateRefund.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ protected function getTransactionId()
* Get the message body data for serializing.
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
// The mandatory fields.
Expand Down
1 change: 1 addition & 0 deletions src/Request/CreateRelease.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public function __construct(Endpoint $endpoint, Auth $auth, $transactionId, Amou
* Get the message body data for serializing.
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
$body = parent::jsonSerialize();
Expand Down
1 change: 1 addition & 0 deletions src/Request/CreateRepeatPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ public function withGiftAid($giftAid)
* Get the message body data for serializing.
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
// The mandatory fields.
Expand Down
1 change: 1 addition & 0 deletions src/Request/CreateSecure3D.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public function __construct(Endpoint $endpoint, Auth $auth, $paRes, $transaction
* Get the message body data for serializing.
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return [
Expand Down
1 change: 1 addition & 0 deletions src/Request/CreateSessionKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public function __construct(Endpoint $endpoint, Auth $auth)
/**
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return [
Expand Down
1 change: 1 addition & 0 deletions src/Request/FetchInstructions.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class FetchInstructions extends AbstractInstruction
* Get the message body data for serializing.
* There is no body data for this message.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
}
Expand Down
1 change: 1 addition & 0 deletions src/Request/FetchSessionKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public function getMerchantSessionKey()
/**
* This message has no body.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
}
Expand Down
1 change: 1 addition & 0 deletions src/Request/FetchTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public function getTransactionId()
* Get the message body data for serializing.
* There is no body data for this message.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
}
Expand Down
1 change: 1 addition & 0 deletions src/Request/LinkSecurityCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public function getCardIdentifier()
* Get the message body data for serializing.
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
$return = [
Expand Down
1 change: 1 addition & 0 deletions src/Request/Model/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ protected function addFieldPrefix($field)
*
* @return array Data for passing to the API, requiring JSON conversion first.
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
$return = [
Expand Down
1 change: 1 addition & 0 deletions src/Request/Model/Person.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public function getPhone()
/**
* @return array The Person returned as an array for the API, requiring conversion to JSON
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
// First/last name is always required.
Expand Down
1 change: 1 addition & 0 deletions src/Request/Model/ReusableCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public static function fromData($data)
* Return the complete object data for serialized storage.
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
$message = [
Expand Down
1 change: 1 addition & 0 deletions src/Request/Model/ReusableCvvCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public function __construct($sessionKey, $cardIdentifier)
* Return the complete object data for serialized storage.
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
$message = [
Expand Down
1 change: 1 addition & 0 deletions src/Request/Model/SingleUseCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public function withSave($save = true)
* Return the complete object data for serialized storage.
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
$message = [
Expand Down
1 change: 1 addition & 0 deletions src/Response/AbstractInstruction.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public function getDate()
/**
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return [
Expand Down
1 change: 1 addition & 0 deletions src/Response/AbstractTransaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ public function getAvsCvcCheck()
*
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
$return = [];
Expand Down
1 change: 1 addition & 0 deletions src/Response/CardIdentifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public function isExpired()
* Reduce the object to an array so it can be serialised and stored between pages.
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return [
Expand Down
1 change: 1 addition & 0 deletions src/Response/ErrorCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public function isError()
* Reduce the object to an array so it can be serialised.
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
$return = [
Expand Down
1 change: 1 addition & 0 deletions src/Response/InstructionCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function setData($data, $httpCode = null)
/**
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return [
Expand Down
1 change: 1 addition & 0 deletions src/Response/Model/Amount.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public function getData()
* Serialisation for storage/logging/debug.
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->getData();
Expand Down
1 change: 1 addition & 0 deletions src/Response/Model/AvsCvcCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ public function getData()
/**
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->getData();
Expand Down
1 change: 1 addition & 0 deletions src/Response/Model/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public function getData()
* Serialisation for storage.
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->getData();
Expand Down
1 change: 1 addition & 0 deletions src/Response/Model/Error.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ public static function fromData($data, $httpCode = null)
* Reduce the object to an array so it can be serialised.
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
$return = [
Expand Down
1 change: 1 addition & 0 deletions src/Response/NoContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public function setData($data)
/**
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return [];
Expand Down
1 change: 1 addition & 0 deletions src/Response/Secure3D.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public function isSuccess()
* Convenient serialisation for logging and debugging.
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
$return = [];
Expand Down
1 change: 1 addition & 0 deletions src/Response/Secure3DRedirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public function getPaRequestFields($termUrl = null, $md = null)
* Convenient serialisation for logging and debugging.
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
$return = parent::jsonSerialize();
Expand Down
1 change: 1 addition & 0 deletions src/Response/SessionKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public function toHtmlElements()
* Reduce the object to an array so it can be serialised.
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return [
Expand Down
1 change: 1 addition & 0 deletions src/Security/SensitiveValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public function unserialize($serialized)
/**
* {@inheritDoc}
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
}
Expand Down
1 change: 1 addition & 0 deletions src/ServerRequest/Secure3DAcs.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ protected function setData($data)
* Only needed for debugging or logging.
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return [
Expand Down
Loading

0 comments on commit 6027cfb

Please sign in to comment.