Skip to content

Commit

Permalink
csfixed
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverFire committed May 22, 2019
1 parent d9eb38a commit c9faba9
Show file tree
Hide file tree
Showing 18 changed files with 97 additions and 38 deletions.
3 changes: 3 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ return PhpCsFixer\Config::create()
'phpdoc_scalar' => false,
'phpdoc_separation' => false,
'phpdoc_to_comment' => false,
'phpdoc_var_without_name' => false,
'method_argument_space' => false,
'ereg_to_preg' => true,
'blank_line_after_opening_tag' => true,
Expand All @@ -50,5 +51,7 @@ return PhpCsFixer\Config::create()
->notPath('vendor')
->notPath('runtime')
->notPath('web/assets')
->notPath('public/assets')
->notPath('tests/_support/_generated')
)
;
2 changes: 1 addition & 1 deletion src/Message/CaptureRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public function getData()

/**
* @param mixed $data
* @return \Omnipay\Common\Message\ResponseInterface|CaptureResponse
* @throws InvalidRequestException
* @return \Omnipay\Common\Message\ResponseInterface|CaptureResponse
*/
public function sendData($data)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Message/CaptureResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use YandexCheckout\Request\Payments\Payment\CreateCaptureResponse;

/**
* Class CaptureResponse
* Class CaptureResponse.
*
* @author Dmytro Naumenko <d.naumenko.a@gmail.com>
* @property CreateCaptureResponse $data
Expand Down
14 changes: 11 additions & 3 deletions src/Message/DetailsRequest.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
<?php
/**
* Yandex.Kassa driver for Omnipay payment processing library
*
* @link https://github.com/hiqdev/omnipay-yandex-kassa
* @package omnipay-yandex-kassa
* @license MIT
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/)
*/

namespace Omnipay\YandexKassa\Message;

use Omnipay\Common\Exception\InvalidResponseException;
use Omnipay\Common\Message\ResponseInterface;

/**
* Class DetailsRequest
* Class DetailsRequest.
*
* @author Dmytro Naumenko <d.naumenko.a@gmail.com>
*/
Expand All @@ -20,11 +28,11 @@ public function getData()
}

/**
* Send the request with specified data
* Send the request with specified data.
*
* @param mixed $data The data to send
* @return DetailsResponse|ResponseInterface
* @throws InvalidResponseException
* @return DetailsResponse|ResponseInterface
*/
public function sendData($data): ResponseInterface
{
Expand Down
11 changes: 9 additions & 2 deletions src/Message/DetailsResponse.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
/**
* Yandex.Kassa driver for Omnipay payment processing library
*
* @link https://github.com/hiqdev/omnipay-yandex-kassa
* @package omnipay-yandex-kassa
* @license MIT
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/)
*/

namespace Omnipay\YandexKassa\Message;

Expand All @@ -8,7 +16,7 @@
use YandexCheckout\Model\PaymentInterface;

/**
* Class DetailsResponse
* Class DetailsResponse.
*
* @author Dmytro Naumenko <d.naumenko.a@gmail.com>
* @property PaymentInterface $data
Expand Down Expand Up @@ -86,5 +94,4 @@ public function getPayer(): string

return $method->getTitle();
}

}
14 changes: 11 additions & 3 deletions src/Message/IncomingNotificationRequest.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
<?php
/**
* Yandex.Kassa driver for Omnipay payment processing library
*
* @link https://github.com/hiqdev/omnipay-yandex-kassa
* @package omnipay-yandex-kassa
* @license MIT
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/)
*/

namespace Omnipay\YandexKassa\Message;

use Omnipay\Common\Exception\InvalidResponseException;
use Omnipay\Common\Message\ResponseInterface;

/**
* Class IncomingNotificationRequest
* Class IncomingNotificationRequest.
*
* @author Dmytro Naumenko <d.naumenko.a@gmail.com>
* @method IncomingNotificationResponse send()
Expand All @@ -21,11 +29,11 @@ public function getData()
}

/**
* Send the request with specified data
* Send the request with specified data.
*
* @param mixed $data The data to send
* @return ResponseInterface
* @throws InvalidResponseException
* @return ResponseInterface
*/
public function sendData($data): ResponseInterface
{
Expand Down
2 changes: 0 additions & 2 deletions src/Message/PurchaseRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

use Omnipay\Common\Exception\InvalidRequestException;
use Throwable;
use YandexCheckout\Request\Payments\CreatePaymentResponse;

/**
* Class PurchaseRequest.
Expand Down Expand Up @@ -58,4 +57,3 @@ public function sendData($data)
}
}
}

8 changes: 8 additions & 0 deletions tests/_bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
/**
* Yandex.Kassa driver for Omnipay payment processing library
*
* @link https://github.com/hiqdev/omnipay-yandex-kassa
* @package omnipay-yandex-kassa
* @license MIT
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/)
*/

error_reporting(E_ALL & ~E_NOTICE);

Expand Down
6 changes: 3 additions & 3 deletions tests/unit/GatewayTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/**
* Ikajo driver for the Omnipay PHP payment processing library
* Yandex.Kassa driver for Omnipay payment processing library
*
* @link https://github.com/hiqdev/omnipay-ikajo
* @package omnipay-ikajo
* @link https://github.com/hiqdev/omnipay-yandex-kassa
* @package omnipay-yandex-kassa
* @license MIT
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/)
*/
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/Message/CaptureRequestTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/**
* YandexKassa driver for the Omnipay PHP payment processing library
* Yandex.Kassa driver for Omnipay payment processing library
*
* @link https://github.com/hiqdev/omnipay-YandexKassa
* @package omnipay-YandexKassa
* @link https://github.com/hiqdev/omnipay-yandex-kassa
* @package omnipay-yandex-kassa
* @license MIT
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/)
*/
Expand Down
12 changes: 9 additions & 3 deletions tests/unit/Message/CaptureResponseTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
<?php
/**
* Yandex.Kassa driver for Omnipay payment processing library
*
* @link https://github.com/hiqdev/omnipay-yandex-kassa
* @package omnipay-yandex-kassa
* @license MIT
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/)
*/

namespace Omnipay\YandexKassa\Tests\Message;

use Omnipay\YandexKassa\Message\CaptureRequest;
use Omnipay\YandexKassa\Message\CaptureResponse;
use Omnipay\YandexKassa\Message\DetailsResponse;
use Omnipay\YandexKassa\Message\IncomingNotificationRequest;
use Symfony\Component\HttpFoundation\Request as HttpRequest;
Expand All @@ -13,7 +20,6 @@ class CaptureResponseTest extends TestCase
/** @var IncomingNotificationRequest */
private $request;


private $shopId = '54401';
private $secretKey = 'test_Fh8hUAVVBGUGbjmlzba6TB0iyUbos_lueTHE-axOwM0';
private $transactionReference = '2475e163-000f-5000-9000-18030530d620';
Expand Down Expand Up @@ -45,7 +51,7 @@ public function testSuccess(): void
->willReturn([
[],
$this->fixture('payment.succeeded'),
['http_code' => 200]
['http_code' => 200],
]);

$this->getYandexClient($this->request)
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/Message/DetailsRequestTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/**
* YandexKassa driver for the Omnipay PHP payment processing library
* Yandex.Kassa driver for Omnipay payment processing library
*
* @link https://github.com/hiqdev/omnipay-YandexKassa
* @package omnipay-YandexKassa
* @link https://github.com/hiqdev/omnipay-yandex-kassa
* @package omnipay-yandex-kassa
* @license MIT
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/)
*/
Expand Down Expand Up @@ -50,7 +50,7 @@ public function testSendData()
->willReturn([
[],
$this->fixture('payment.waiting_for_capture'),
['http_code' => 200]
['http_code' => 200],
]);

$this->getYandexClient($this->request)
Expand Down
10 changes: 9 additions & 1 deletion tests/unit/Message/DetailsResponseTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
/**
* Yandex.Kassa driver for Omnipay payment processing library
*
* @link https://github.com/hiqdev/omnipay-yandex-kassa
* @package omnipay-yandex-kassa
* @license MIT
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/)
*/

namespace Omnipay\YandexKassa\Tests\Message;

Expand Down Expand Up @@ -37,7 +45,7 @@ public function testSuccess(): void
->willReturn([
[],
$this->fixture('payment.waiting_for_capture'),
['http_code' => 200]
['http_code' => 200],
]);

$this->getYandexClient($this->request)
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/Message/IncomingNotificationRequestTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/**
* YandexKassa driver for the Omnipay PHP payment processing library
* Yandex.Kassa driver for Omnipay payment processing library
*
* @link https://github.com/hiqdev/omnipay-YandexKassa
* @package omnipay-YandexKassa
* @link https://github.com/hiqdev/omnipay-yandex-kassa
* @package omnipay-yandex-kassa
* @license MIT
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/)
*/
Expand Down
8 changes: 8 additions & 0 deletions tests/unit/Message/IncomingNotificationResponseTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
/**
* Yandex.Kassa driver for Omnipay payment processing library
*
* @link https://github.com/hiqdev/omnipay-yandex-kassa
* @package omnipay-yandex-kassa
* @license MIT
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/)
*/

namespace Omnipay\YandexKassa\Tests\Message;

Expand Down
9 changes: 3 additions & 6 deletions tests/unit/Message/PurchaseRequestTest.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
<?php
/**
* YandexKassa driver for the Omnipay PHP payment processing library
* Yandex.Kassa driver for Omnipay payment processing library
*
* @link https://github.com/hiqdev/omnipay-YandexKassa
* @package omnipay-YandexKassa
* @link https://github.com/hiqdev/omnipay-yandex-kassa
* @package omnipay-yandex-kassa
* @license MIT
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/)
*/

namespace Omnipay\YandexKassa\Tests\Message;

use Omnipay\YandexKassa\Message\CaptureResponse;
use Omnipay\YandexKassa\Message\PurchaseRequest;
use Omnipay\YandexKassa\Message\PurchaseResponse;
use YandexCheckout\Model\Confirmation\ConfirmationRedirect;
use YandexCheckout\Request\Payments\CreatePaymentResponse;

class PurchaseRequestTest extends TestCase
{
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/Message/PurchaseResponseTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/**
* Ikajo driver for the Omnipay PHP payment processing library
* Yandex.Kassa driver for Omnipay payment processing library
*
* @link https://github.com/hiqdev/omnipay-ikajo
* @package omnipay-ikajo
* @link https://github.com/hiqdev/omnipay-yandex-kassa
* @package omnipay-yandex-kassa
* @license MIT
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/)
*/
Expand Down
8 changes: 8 additions & 0 deletions tests/unit/Message/TestCase.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
/**
* Yandex.Kassa driver for Omnipay payment processing library
*
* @link https://github.com/hiqdev/omnipay-yandex-kassa
* @package omnipay-yandex-kassa
* @license MIT
* @copyright Copyright (c) 2019, HiQDev (http://hiqdev.com/)
*/

namespace Omnipay\YandexKassa\Tests\Message;

Expand Down

0 comments on commit c9faba9

Please sign in to comment.