Skip to content

Commit 8982405

Browse files
committed
Cleaned some code and Added Scrutinizer profile.
1 parent 5df0cb0 commit 8982405

File tree

119 files changed

+173
-567
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+173
-567
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.*
22
!.gitignore
33
!.gitkeep
4+
!.scrutinizer.yml
45
_ide_helper.php
56
composer.lock
67
vendor

.scrutinizer.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
filter:
2+
excluded_paths: [tests/*]
3+
4+
checks:
5+
php:
6+
code_rating: true
7+
duplication: true
8+
variable_existence: true
9+
useless_calls: true
10+
use_statement_alias_conflict: true
11+
unused_variables: true
12+
unused_properties: true
13+
unused_parameters: true
14+
unused_methods: true
15+
unreachable_code: true
16+
sql_injection_vulnerabilities: true
17+
security_vulnerabilities: true
18+
precedence_mistakes: true
19+
precedence_in_conditions: true
20+
parameter_non_unique: true
21+
no_property_on_interface: true
22+
no_non_implemented_abstract_methods: true
23+
deprecated_code_usage: true
24+
closure_use_not_conflicting: true
25+
closure_use_modifiable: true
26+
avoid_useless_overridden_methods: true
27+
avoid_conflicting_incrementers: true
28+
assignment_of_null_return: true
29+
avoid_usage_of_logical_operators: true
30+
ensure_lower_case_builtin_functions: true
31+
foreach_traversable: true
32+
function_in_camel_caps: true
33+
instanceof_class_exists: true
34+
lowercase_basic_constants: true
35+
lowercase_php_keywords: true
36+
missing_arguments: true
37+
no_commented_out_code: true
38+
no_duplicate_arguments: true
39+
no_else_if_statements: true
40+
no_space_between_concatenation_operator: true
41+
no_space_inside_cast_operator: true
42+
no_trailing_whitespace: true
43+
no_underscore_prefix_in_properties: true
44+
no_unnecessary_if: true
45+
no_unnecessary_function_call_in_for_loop: true
46+
non_commented_empty_catch_block: true
47+
php5_style_constructor: true
48+
parameters_in_camelcaps: true
49+
prefer_while_loop_over_for_loop: true
50+
properties_in_camelcaps: true
51+
require_scope_for_methods: true
52+
require_scope_for_properties: true
53+
spacing_around_conditional_operators: true
54+
spacing_around_non_conditional_operators: true
55+
spacing_of_function_arguments: true

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
[![Code Climate](https://codeclimate.com/github/AudithSoftworks/Nexway-API-PHP-Client/badges/gpa.svg)](https://codeclimate.com/github/AudithSoftworks/Nexway-API-PHP-Client)
2-
[![Test Coverage](https://codeclimate.com/github/AudithSoftworks/Nexway-API-PHP-Client/badges/coverage.svg)](https://codeclimate.com/github/AudithSoftworks/Nexway-API-PHP-Client)
1+
[![Code Climate](https://codeclimate.com/github/AudithSoftworks/Nexway-Merchant-API-PHP-Client/badges/gpa.svg)](https://codeclimate.com/github/AudithSoftworks/Nexway-Merchant-API-PHP-Client)
2+
[![Code Quality](https://scrutinizer-ci.com/g/AudithSoftworks/Nexway-Merchant-API-PHP-Client/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/AudithSoftworks/Nexway-Merchant-API-PHP-Client)
33
[![Latest Stable Version](https://poser.pugx.org/audithsoftworks/nexway-merchant-api-php-client/v/stable.svg)](https://packagist.org/packages/audithsoftworks/nexway-merchant-api-php-client)
44
[![Total Downloads](https://poser.pugx.org/audithsoftworks/nexway-merchant-api-php-client/downloads.svg)](https://packagist.org/packages/audithsoftworks/nexway-merchant-api-php-client)
5-
[![Latest Unstable Version](https://poser.pugx.org/audithsoftworks/nexway-merchant-api-php-client/v/unstable.svg)](https://packagist.org/packages/audithsoftworks/nexway-merchant-api-php-client)
5+
[![Latest Unstable Version](https://poser.pugx.org/audithsoftworks/nexway-merchant-api-php-client/v/unstable.svg)](https://packagist.org/packages/audithsoftworks/nexway-merchant-api-php-client)
66
[![License](https://poser.pugx.org/audithsoftworks/nexway-merchant-api-php-client/license.svg)](https://packagist.org/packages/audithsoftworks/nexway-merchant-api-php-client)
77

88
# Nexway API implementation in PHP (by Shahriyar Imanov at Audith Softworks) #
@@ -14,14 +14,14 @@ This library implements Nexway's WSDL/SOAP powered API interface, using PHP's OO
1414

1515
* Before being able to use this library, you need working Test configuration access token to [Nexway](http://www.nexway.com) WebServices interface. For production environment, you will need the Live configuration token as well.
1616
* Once Nexway's access tokens have been acquired, enter them in ```/src/Audith/Providers/Nexway/config.ini``` file, in appropriate sections.
17-
* Check out Unit-tests in ```/unit-tests``` folder for use-cases.
17+
* Check out Unit-tests in ```/tests``` folder for use-cases.
1818

1919

2020
## How to run Unit-tests? ##
2121

2222
Composer configuration file includes ```phpunit/phpunit``` package for development purposes. Once ```composer install``` has been executed, PHPUnit library files will be fetched.
2323

24-
Run following command to execute unit-tests: ```./vendor/phpunit/phpunit/phpunit --verbose --colors --strict --debug unit-tests/```
24+
Run following command to execute unit-tests: ```./vendor/phpunit/phpunit/phpunit --verbose --colors --strict --debug tests/```
2525

2626

2727
## How to build Documentation using PHPDocumentor? ##

src/Audith/Providers/Nexway/Exception.php

+1-7
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,4 @@ class Exception extends \Exception
1111
70 => "SecretIsMissingException",
1212
71 => "SecretNotValidException"
1313
);
14-
15-
16-
public function __construct($msg, $code = null)
17-
{
18-
parent::__construct($msg, $code);
19-
}
20-
}
14+
}

src/Audith/Providers/Nexway/Exception/AffiliateIdIsInactiveOrInvalidException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class AffiliateIdIsInactiveOrInvalidException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/AmountDutyFreeIsMissingException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class AmountDutyFreeIsMissingException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/AmountDutyFreeIsNotValidException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class AmountDutyFreeIsNotValidException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/AmountTotalIsMissingException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class AmountTotalIsMissingException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/AmountTotalIsNotValidException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class AmountTotalIsNotValidException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/CartSizeTooBigBackupFailedException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class CartSizeTooBigBackupFailedException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/ConfigFileNotReadableException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class ConfigFileNotReadableException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/CountryDoesntExistException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class CountryDoesntExistException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/CurrencyDoesntExistException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class CurrencyDoesntExistException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/CurrencyIsMissingException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class CurrencyIsMissingException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/CurrencyIsNotValidException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class CurrencyIsNotValidException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/CurrentConfigurationRequiresUnitPriceHtOrTotalAmountException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class CurrentConfigurationRequiresUnitPriceHtOrTotalAmountException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/CustomerEmailIsMissingException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class CustomerEmailIsMissingException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/CustomerEmailIsNotValidException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class CustomerEmailIsNotValidException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/CustomerLanguageIsMissingException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class CustomerLanguageIsMissingException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/CustomerLanguageIsNotValidException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class CustomerLanguageIsNotValidException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/CustomerPartnerIdIsMissingException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class CustomerPartnerIdIsMissingException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/CustomerPartnerIdIsNotValidException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class CustomerPartnerIdIsNotValidException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/DateIsMissingException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class DateIsMissingException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/DateIsNotValidException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class DateIsNotValidException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/DeliveryLocationIsMissingException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class DeliveryLocationIsMissingException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/DiscountForeignRefIsMissingException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class DiscountForeignRefIsMissingException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/DiscountForeignRefIsNotValidException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class DiscountForeignRefIsNotValidException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/DiscountIsMissingException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class DiscountIsMissingException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/DiscountLabelIsMissingException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class DiscountLabelIsMissingException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

src/Audith/Providers/Nexway/Exception/DiscountLabelIsNotValidException.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77

88
class DiscountLabelIsNotValidException extends \Audith\Providers\Nexway\Exception
99
{
10-
public function __construct($msg = "", $code = null)
11-
{
12-
parent::__construct($msg, $code);
13-
}
14-
}
10+
}

0 commit comments

Comments
 (0)