Skip to content

Commit

Permalink
Merge pull request #27 from mysiar/dev
Browse files Browse the repository at this point in the history
additional-clean-up (#25)
  • Loading branch information
mysiar authored May 22, 2022
2 parents d43d606 + d7a8ad4 commit b088ae9
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 15 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
runs-on: [ubuntu-18.04]
strategy:
matrix:
php: [7.2]
php: ['7.2', '7.4', '8.0', '8.1']
steps:
- name: Setup PHP
- name: Setup PHP (PHP ${{ matrix.php }})
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
Expand All @@ -24,9 +24,10 @@ jobs:
- uses: actions/checkout@v1
- name: Install Composer dependencies
run: composer install
- name: Coding standard
- uses: symfonycorp/security-checker-action@v3
- name: Coding standard (PHP ${{ matrix.php }})
run: php${{ matrix.php }} ./vendor/bin/ecs check src tests
- name: PHPUnit tests
- name: PHPUnit tests (PHP ${{ matrix.php }})
run: php${{ matrix.php }} ./vendor/bin/phpunit --testdox --verbose --stop-on-failure
- name: Code coverage
run: php${{ matrix.php }} -d xdebug.mode=coverage ./vendor/bin/phpunit --coverage-clover=var/coverage.xml
Expand All @@ -36,8 +37,5 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./var/coverage.xml
fail_ci_if_error: true
- name: Upload coverage to Scrutinizer
run: |
wget https://scrutinizer-ci.com/ocular.phar
cp var/coverage.xml var/coverage.clover
php${{ matrix.php }} ocular.phar code-coverage:upload --access-token="${{ secrets.SCRUTINIZER_TOKEN }}" --format=php-clover var/coverage.clover
- name: Display the vulnerabilities as JSON
run: echo ${{ steps.security-check.outputs.vulns }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ vendor
composer.lock
tests-api/.env
var/
.phpunit.result.cache
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"php": "^7.2|^8.0"
},
"require-dev": {
"omnipay/tests": "^3",
"omnipay/tests": "^4",
"symplify/easy-coding-standard": "^10.2",
"symfony/var-dumper": "^5.4"
}
Expand Down
2 changes: 1 addition & 1 deletion ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Symplify\EasyCodingStandard\ValueObject\Option;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;

return static function (ECSConfig $ecsConfig): void {
return static function(ECSConfig $ecsConfig): void {
$parameters = $ecsConfig->parameters();
$parameters->set(Option::PATHS, [
__DIR__ . '/src',
Expand Down
2 changes: 1 addition & 1 deletion src/Message/CompletePurchaseRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function sendData($data)

$responseData = json_decode($httpResponse->getBody()->getContents(), true);

return $this->response = new CompletePurchaseResponse($this, $responseData, $this->getEndpoint());
return $this->response = new CompletePurchaseResponse($this, $responseData);
}

private function generateSignature(): string
Expand Down
2 changes: 1 addition & 1 deletion src/Message/RefundsResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function __construct(RequestInterface $request, $data)
}
}

public function getRefunds(): array
public function getRefunds(): ?array
{
return $this->refunds;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/GatewayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class GatewayTest extends GatewayTestCase
*/
protected $gateway;

public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down
2 changes: 1 addition & 1 deletion tests/Message/CardCharge3dsRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class CardCharge3dsRequestTest extends TestCase
*/
private $request;

public function setUp()
public function setUp(): void
{
$this->request = new CardCharge3dsRequest($this->getHttpClient(), $this->getHttpRequest());
$this->request->initialize([
Expand Down

0 comments on commit b088ae9

Please sign in to comment.