VindiRoutes
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
class VindiRoutes
{
/**
* @var VindiSettings
File RoutesApi.php
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace VindiPaymentGateways;
class VindiRoutes
The class VindiRoutes has an overall complexity of 77 which is very high. The configured complexity threshold is 50. Open
class VindiRoutes
{
/**
* @var VindiSettings
- Exclude checks
The class VindiRoutes has 23 public methods. Consider refactoring VindiRoutes to keep number of public methods under 10. Open
class VindiRoutes
{
/**
* @var VindiSettings
- Read upRead up
- Exclude checks
TooManyPublicMethods
Since: 0.1
A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.
By default it ignores methods starting with 'get' or 'set'.
Example
Source https://phpmd.org/rules/codesize.html#toomanypublicmethods
Function getPaymentMethods
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function getPaymentMethods()
{
if (false === ($payment_methods = get_transient('vindi_payment_methods'))) {
$payment_methods = array(
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function isSubscriptionActive
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function isSubscriptionActive($subscription_id)
{
$subscription_id = filter_var($subscription_id, FILTER_SANITIZE_NUMBER_INT);
if (isset($this->recentRequest)
&& $this->recentRequest['id'] == $subscription_id) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
The method isMerchantStatusTrialOrSandbox has a boolean flag argument $is_config, which is a certain sign of a Single Responsibility Principle violation. Open
public function isMerchantStatusTrialOrSandbox($is_config = false)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method getMerchant has a boolean flag argument $is_config, which is a certain sign of a Single Responsibility Principle violation. Open
public function getMerchant($is_config = false)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method suspendSubscription has a boolean flag argument $cancel_bills, which is a certain sign of a Single Responsibility Principle violation. Open
public function suspendSubscription($subscription_id, $cancel_bills = false)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Avoid assigning values to variables in if clauses and the like (line '212', column '10'). Open
public function createSubscription($data)
{
if (($response = $this->api->request('subscriptions', 'POST', $data)) &&
isset($response['subscription']['id'])) {
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid assigning values to variables in if clauses and the like (line '377', column '9'). Open
public function deleteBill($bill_id, $comments = '')
{
$query = '';
if($comments)
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid assigning values to variables in if clauses and the like (line '388', column '20'). Open
public function getPaymentMethods()
{
if (false === ($payment_methods = get_transient('vindi_payment_methods'))) {
$payment_methods = array(
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid assigning values to variables in if clauses and the like (line '363', column '9'). Open
public function createBill($data)
{
if ($response = $this->api->request('bills', 'POST', $data)) {
return $response['bill'];
}
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid assigning values to variables in if clauses and the like (line '440', column '20'). Open
public function getMerchant($is_config = false)
{
if (false === ($merchant = get_transient('vindi_merchant')) || $is_config) {
$response = $this->api->request('merchant', 'GET');
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid assigning values to variables in if clauses and the like (line '263', column '7'). Open
public function getSubscription($subscription_id)
{
if ($response = $this->api->request("subscriptions/". filter_var($subscription_id, FILTER_SANITIZE_NUMBER_INT),'GET')['subscription'])
return $response;
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid assigning values to variables in if clauses and the like (line '250', column '9'). Open
public function activateSubscription($subscription_id)
{
if ($response = $this->api->request('subscriptions/' . filter_var($subscription_id, FILTER_SANITIZE_NUMBER_INT) . '/reactivate', 'POST'))
return $response;
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
The property $vindi_settings is not named in camelCase. Open
class VindiRoutes
{
/**
* @var VindiSettings
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $current_plan is not named in camelCase. Open
class VindiRoutes
{
/**
* @var VindiSettings
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
Avoid variables with short names like $id. Configured minimum length is 3. Open
public function findCustomerById($id)
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Visibility must be declared on method "__construct" Open
function __construct(VindiSettings $vindi_settings)
- Exclude checks
Blank line found at start of control structure Open
isset($response['subscription']['id'])) {
- Exclude checks
Blank line found at start of control structure Open
if (false === ($payment_methods = get_transient('vindi_payment_methods'))) {
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
sprintf('subscriptions/%s%s', filter_var($subscription_id, FILTER_SANITIZE_NUMBER_INT), $query), 'DELETE');
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
sprintf('bills/%s%s', filter_var($bill_id, FILTER_SANITIZE_NUMBER_INT), $query), 'DELETE')
- Exclude checks
Inline control structures are not allowed Open
if(!$cancel_bills)
- Exclude checks
Line exceeds 120 characters; contains 142 characters Open
if ($response = $this->api->request("subscriptions/". filter_var($subscription_id, FILTER_SANITIZE_NUMBER_INT),'GET')['subscription'])
- Exclude checks
Inline control structures are not allowed Open
if ($response = $this->api->request("subscriptions/". filter_var($subscription_id, FILTER_SANITIZE_NUMBER_INT),'GET')['subscription'])
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int $subscription_id
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $response;
- Exclude checks
Inline control structures are not allowed Open
if(false !== $product)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getSubscription($subscription_id)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return array|bool|mixed
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Line exceeds 120 characters; contains 141 characters Open
if ($response = $this->api->request('subscriptions/' . filter_var($subscription_id, FILTER_SANITIZE_NUMBER_INT) . '/reactivate', 'POST'))
- Exclude checks
Inline control structures are not allowed Open
if ($response = $this->api->request('subscriptions/' . filter_var($subscription_id, FILTER_SANITIZE_NUMBER_INT) . '/reactivate', 'POST'))
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($response = $this->api->request("subscriptions/". filter_var($subscription_id, FILTER_SANITIZE_NUMBER_INT),'GET')['subscription'])
- Exclude checks
Inline control structures are not allowed Open
if ($this->recentRequest['status'] != 'canceled')
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Inline control structures are not allowed Open
if (isset($response['bill']))
- Exclude checks
Inline control structures are not allowed Open
if (false == $response)
- Exclude checks
Line exceeds 120 characters; contains 122 characters Open
} else if ('PaymentMethod::BankSlip' === $method['type'] || 'PaymentMethod::OnlineBankSlip' === $method['type']) {
- Exclude checks
Inline control structures are not allowed Open
if (empty($response['charge']))
- Exclude checks
Inline control structures are not allowed Open
if($comments)
- Exclude checks
Inline control structures are not allowed Open
if (!$response || !$response['merchant'])
- Exclude checks
Inline control structures are not allowed Open
if (empty($customer))
- Exclude checks
Inline control structures are not allowed Open
if (end($response['payment_profiles']) !== null)
- Exclude checks
Line exceeds 120 characters; contains 133 characters Open
$response = $this->api->request(sprintf('charges/%s/refund', filter_var($charge_id, FILTER_SANITIZE_NUMBER_INT)), 'POST', $data);
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return $response['plan'];
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
'products/%s',
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return $productExists;
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function createPlan($data)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$this->vindi_settings = $vindi_settings;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
return $response['charge'];
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$response = $this->api->request('plans', 'POST', $data);
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function updatePlan($plan_id, $data)
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
filter_var($plan_id, FILTER_SANITIZE_NUMBER_INT)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
'plans/%s',
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$this->api = $this->vindi_settings->api;
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function findProductById($product_id)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$response = $this->api->request(sprintf(
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$productExists = isset($response['product']['id']) ? $response['product'] : false;
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
'plans/%s',
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
filter_var($plan_id, FILTER_SANITIZE_NUMBER_INT)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$response = $this->api->request(sprintf(
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
function __construct(VindiSettings $vindi_settings)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
), 'GET');
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
filter_var($product_id, FILTER_SANITIZE_NUMBER_INT)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
filter_var($product_id, FILTER_SANITIZE_NUMBER_INT)
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
'products/%s',
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
);
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
private $vindi_settings;
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public $api;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
$response = $this->api->request(
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
), 'PUT', $data);
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
), 'PUT', $data);
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
sprintf('subscriptions/%s%s', filter_var($subscription_id, FILTER_SANITIZE_NUMBER_INT), $query), 'DELETE');
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return $response['product'];
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$response = $this->api->request('customers', 'POST', $data);
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
'customers/%s',
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
isset($response['subscription']['id'])) {
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
$subscription['bill'] = $response['bill'];
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
return $subscription;
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Multi-line function call not indented correctly; expected 4 spaces but found 6 Open
sprintf('subscriptions/%s%s', filter_var($subscription_id, FILTER_SANITIZE_NUMBER_INT), $query), 'DELETE');
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if (isset($this->recentRequest)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$response = $this->getSubscription($subscription_id);
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
'payment_profiles/%s/verify',
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$response = $this->api->request('payment_profiles', 'POST', $data, $log);
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$subscription_id = filter_var($subscription_id, FILTER_SANITIZE_NUMBER_INT);
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function verifyCustomerPaymentProfile($payment_profile_id)
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
filter_var($payment_profile_id, FILTER_SANITIZE_NUMBER_INT)
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 10 Open
return $response['payment_profile'];
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
'customers/%s',
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(!$cancel_bills)
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 10 Open
$log['card_cvv'] = '***';
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$response = $this->api->request(sprintf(
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$response = $this->api->request(sprintf(
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Closing parenthesis of a multi-line function call must be on a line by itself Open
sprintf('subscriptions/%s%s', filter_var($subscription_id, FILTER_SANITIZE_NUMBER_INT), $query), 'DELETE');
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
return false;
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$code = sanitize_text_field($code);
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
return $response;
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if ($response && array_key_exists('status', $response)) {
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
filter_var($payment_profile_id, FILTER_SANITIZE_NUMBER_INT)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
if(false !== $product)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return $response['product'];
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 10 Open
return $response['customer'];
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
'customers/%s',
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function suspendSubscription($subscription_id, $cancel_bills = false)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
if ($response = $this->api->request('subscriptions/' . filter_var($subscription_id, FILTER_SANITIZE_NUMBER_INT) . '/reactivate', 'POST'))
- Exclude checks
No space found after comma in function call Open
if ($response = $this->api->request("subscriptions/". filter_var($subscription_id, FILTER_SANITIZE_NUMBER_INT),'GET')['subscription'])
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 6 Open
if ($response['status'] != 'canceled') {
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
'customers/%s',
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function deleteCustomer($user_id)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
), 'DELETE');
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
filter_var($id, FILTER_SANITIZE_NUMBER_INT)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
), 'GET');
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$response = $this->api->request(
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
$product = end($response['products']);
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return $response;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return $response['plan'];
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
&& $this->recentRequest['id'] == $subscription_id) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
if ($this->recentRequest['status'] != 'canceled')
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
filter_var($product_id, FILTER_SANITIZE_NUMBER_INT)
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 8 Open
return true;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
filter_var($product_id, FILTER_SANITIZE_NUMBER_INT)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return 'success' === $this->api->request(sprintf(
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function updateCustomer($user_id, $data)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
), 'POST')['transaction']['status'];
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return $response['customer'];
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
'customers/%s',
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if (($response = $this->api->request('subscriptions', 'POST', $data)) &&
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(false !== $product)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
if(!$cancel_bills)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
return $product;
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function updateProduct($product_id, $data)
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 8 Open
$this->recentRequest = $response;
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 10 Open
$log['card_number'] = sprintf('**** *%s', substr($log['card_number'], -3));
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return $response['customer'];
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function findCustomerById($id)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return false;
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function isSubscriptionActive($subscription_id)
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function createCustomerPaymentProfile($data)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$product = get_transient($transient_key);
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$response = $this->api->request(sprintf(
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function createCustomer($data)
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
filter_var($user_id, FILTER_SANITIZE_NUMBER_INT)
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function findProductByCode($code)
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
'products/%s',
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
filter_var($user_id, FILTER_SANITIZE_NUMBER_INT)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
'customers/%s',
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$query = '';
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
'payment_profiles/%s/verify',
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
'products/%s',
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
filter_var($user_id, FILTER_SANITIZE_NUMBER_INT)
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
filter_var($id, FILTER_SANITIZE_NUMBER_INT)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$userExists = isset($response['customer']['id']) ? $response['customer'] : false;
- Exclude checks
Closing brace indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
return true;
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if (false === empty($response['products'])) {
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
set_transient($transient_key, $product, 1 * HOUR_IN_SECONDS);
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function createProduct($data)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$response = $this->api->request('products', 'POST', $data);
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
), 'PUT', $data);
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function createSubscription($data)
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
$subscription = $response['subscription'];
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
$query = '?cancel_bills=false';
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function activateSubscription($subscription_id)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return false;
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 6 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$response = $this->api->request(sprintf('products?query=code:%s', $code), 'GET');
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
filter_var($user_id, FILTER_SANITIZE_NUMBER_INT)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$response = $this->api->request(sprintf(
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return $userExists;
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return false;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$log = $data;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$transient_key = "vindi_product_{$code}";
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 8 Open
if ('PaymentMethod::CreditCard' === $method['type']) {
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 8 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
if (empty($response['charge']))
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
$this->getPaymentMethods();
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
if($comments)
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
'bills/%s',
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return false;
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 8 Open
return false;
- Exclude checks
Line indented incorrectly; expected at least 24 spaces, found 10 Open
continue;
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function isMerchantStatusTrialOrSandbox($is_config = false)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
$merchant = $is_config ? $this->getMerchant($is_config) : $this->getMerchant();
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if (false === ($merchant = get_transient('vindi_merchant')) || $is_config) {
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
$merchant = $response['merchant'];
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if (empty($response['plan'])) {
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
return false;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$this->current_plan = $response['plan'];
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function findBillById($bill_id)
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
filter_var($bill_id, FILTER_SANITIZE_NUMBER_INT)
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function deleteBill($bill_id, $comments = '')
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 8 Open
} else if ('PaymentMethod::BankSlip' === $method['type'] || 'PaymentMethod::OnlineBankSlip' === $method['type']) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function getCharge($charge_id)
- Exclude checks
Expected 1 space after closing parenthesis; found 5 Open
if (false === $product)
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Multi-line function call not indented correctly; expected 14 spaces but found 12 Open
$method['payment_companies']
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function getPlan($plan_id)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return $this->current_plan;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$product = $this->findProductByCode($code);
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
'status' => 'active',
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
$query = '?comments= ' . $comments;
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
$payment_methods = array(
- Exclude checks
Line indented incorrectly; expected at least 36 spaces, found 10 Open
);
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return false;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$response = $this->api->request(sprintf(
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return $product;
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if ($response = $this->api->request(
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
sprintf('bills/%s%s', filter_var($bill_id, FILTER_SANITIZE_NUMBER_INT), $query), 'DELETE')
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
return $response;
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
'bank_slip' => false,
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
foreach ($response['payment_methods'] as $method) {
- Exclude checks
Line indented incorrectly; expected at least 24 spaces, found 10 Open
$payment_methods['bank_slip'] = true;
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
if (!$response || !$response['merchant'])
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$response = $this->api->request("charges/" . filter_var($charge_id, FILTER_SANITIZE_NUMBER_INT), 'GET');
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function getPaymentProfile($user_vindi_id)
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if (false === $product)
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
'code' => $code,
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function createBill($data)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$query = '';
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function getPaymentMethods()
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 8 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
return false;
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Multi-line function call not indented correctly; expected 4 spaces but found 6 Open
sprintf('bills/%s%s', filter_var($bill_id, FILTER_SANITIZE_NUMBER_INT), $query), 'DELETE')
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if (false === ($payment_methods = get_transient('vindi_payment_methods'))) {
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
if (false == $response)
- Exclude checks
Multi-line function call not indented correctly; expected 14 spaces but found 12 Open
$payment_methods['credit_card'],
- Exclude checks
Usage of ELSE IF is discouraged; use ELSEIF instead Open
} else if ('PaymentMethod::BankSlip' === $method['type'] || 'PaymentMethod::OnlineBankSlip' === $method['type']) {
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
return false;
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
if (isset($response['bill']))
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
),
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return false;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return false;
- Exclude checks
Line indented incorrectly; expected at least 24 spaces, found 12 Open
$method['payment_companies']
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
$response = $this->api->request('merchant', 'GET');
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
if (empty($customer))
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if ($response = $this->api->request('bills', 'POST', $data)) {
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
if (end($response['payment_profiles']) !== null)
- Exclude checks
Closing parenthesis of a multi-line function call must be on a line by itself Open
sprintf('bills/%s%s', filter_var($bill_id, FILTER_SANITIZE_NUMBER_INT), $query), 'DELETE')
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
) {
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
set_transient('vindi_merchant', $merchant, 1 * HOUR_IN_SECONDS);
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return $merchant;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
return false;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
return end($response['payment_profiles']);
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$code = sanitize_text_field($code);
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if (null === $this->api->accept_bank_slip) {
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
'name' => $name,
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return $this->api->accept_bank_slip;
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if($comments)
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
return $this->createProduct(array(
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
filter_var($bill_id, FILTER_SANITIZE_NUMBER_INT)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
return $response['bill'];
- Exclude checks
Line indented incorrectly; expected at least 24 spaces, found 12 Open
$payment_methods['credit_card'],
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 6 Open
}
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
set_transient('vindi_payment_methods', $payment_methods, 1 * HOUR_IN_SECONDS);
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return $payment_methods;
- Exclude checks
Line indented incorrectly; expected 20 spaces, found 8 Open
if ('active' !== $method['status']) {
- Exclude checks
Line indented incorrectly; expected at least 24 spaces, found 10 Open
$payment_methods['credit_card'] = array_merge(
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return $product;
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 10 Open
return true;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$name = sanitize_text_field($name);
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function getMerchant($is_config = false)
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 10 Open
'price' => 0,
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$response = $this->api->request("plans/" . filter_var($plan_id, FILTER_SANITIZE_NUMBER_INT), 'GET');
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
$this->current_plan = false;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
return false;
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function acceptBankSlip()
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$query = urlencode("customer_id={$customer['id']} status=active type=PaymentProfile::CreditCard");
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
), 'GET');
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function findOrCreateProduct($name, $code)
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
));
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
return $response['bill'];
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
$response = $this->api->request('payment_methods', 'GET');
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$customer = $this->findCustomerById($user_vindi_id);
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$response = $this->api->request('payment_profiles?query='.$query, 'GET');
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
{
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
'pricing_schema' => array(
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
'credit_card' => array(),
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
);
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$this->api->accept_bank_slip = $payment_methods['bank_slip'];
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return $response['charge'];
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$user_vindi_id = filter_var($user_vindi_id, FILTER_SANITIZE_NUMBER_INT);
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
'bills/%s',
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$response = $this->api->request(sprintf('charges/%s/refund', filter_var($charge_id, FILTER_SANITIZE_NUMBER_INT)), 'POST', $data);
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if (isset($response['charge'])) {
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
public function refundCharge($charge_id, $data)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
return false;
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
A closing tag is not permitted at the end of a PHP file Open
?>
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
return $response['charge'];
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks