Skip to content

Commit

Permalink
.gitignore & composer.json tweaks, cs
Browse files Browse the repository at this point in the history
Took 57 minutes
  • Loading branch information
jhaoda committed Feb 27, 2020
1 parent 5a25d7b commit c9b703b
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/.idea
composer.phar
/vendor
composer.lock
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"authors": [
{
"name": "JhaoDa",
"email": "[email protected]"
"role": "Developer",
"email": "[email protected]",
"homepage": "https://github.com/jhaoda"
}
],
"support": {
Expand All @@ -22,5 +24,8 @@
"psr-4": {
"Idma\\Robokassa\\": "src/"
}
},
"config": {
"sort-packages": true
}
}
6 changes: 4 additions & 2 deletions src/Exception/EmptyDescriptionException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
*
* @package Idma\Robokassa\Exception
*/
class EmptyDescriptionException extends PaymentException {
public function __construct($message = '', $code = 0, \Exception $previous = null) {
class EmptyDescriptionException extends PaymentException
{
public function __construct($message = '', $code = 0, \Exception $previous = null)
{
parent::__construct('Invoice description is required and cannot be empty.', $code, $previous);
}
}
6 changes: 4 additions & 2 deletions src/Exception/InvalidInvoiceIdException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
*
* @package Idma\Robokassa\Exception
*/
class InvalidInvoiceIdException extends PaymentException {
public function __construct($message = '', $code = 0, \Exception $previous = null) {
class InvalidInvoiceIdException extends PaymentException
{
public function __construct($message = '', $code = 0, \Exception $previous = null)
{
parent::__construct('Invoice id is required and cannot be less or equals zero.', $code, $previous);
}
}
6 changes: 4 additions & 2 deletions src/Exception/InvalidParamException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
*
* @package Idma\Robokassa\Exception
*/
class InvalidParamException extends PaymentException {
public function __construct($message = '', $code = 0, \Exception $previous = null) {
class InvalidParamException extends PaymentException
{
public function __construct($message = '', $code = 0, \Exception $previous = null)
{
parent::__construct('Custom parameters must be an array.', $code, $previous);
}
}
6 changes: 4 additions & 2 deletions src/Exception/InvalidSumException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
*
* @package Idma\Robokassa\Exception
*/
class InvalidSumException extends PaymentException {
public function __construct($message = '', $code = 0, \Exception $previous = null) {
class InvalidSumException extends PaymentException
{
public function __construct($message = '', $code = 0, \Exception $previous = null)
{
parent::__construct('Invoice sum is required and cannot be less or equals zero.', $code, $previous);
}
}
8 changes: 5 additions & 3 deletions src/Exception/PaymentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
*
* @package Idma\Robokassa\Exception
*/
class PaymentException extends \Exception {
public function __construct($message = '', $code = 0, \Exception $previous = null) {
$message = $message ? $message : 'Unknown payment exception.';
class PaymentException extends \Exception
{
public function __construct($message = '', $code = 0, \Exception $previous = null)
{
$message = $message ?: 'Unknown payment exception.';

parent::__construct($message, $code, $previous);
}
Expand Down

0 comments on commit c9b703b

Please sign in to comment.