Method create
has 155 lines of code (exceeds 25 allowed). Consider refactoring. Open
function create($post_id, $post, $update, $recreated = false)
{
// Check if the post is a draft
if (strpos(get_post_status($post_id), 'draft') !== false) {
Method update
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
function update($post_id)
{
$product = wc_get_product($post_id);
// Check if the post is of the signature type
Function create
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
function create($post_id, $post, $update, $recreated = false)
{
// Check if the post is a draft
if (strpos(get_post_status($post_id), 'draft') !== false) {
- 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
File PlansController.php
has 349 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace VindiPaymentGateways;
/**
The class PlansController has an overall complexity of 70 which is very high. The configured complexity threshold is 50. Open
class PlansController
{
/**
* @var array
*/
- Exclude checks
Function update
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
function update($post_id)
{
$product = wc_get_product($post_id);
// Check if the post is of the signature type
- 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
Avoid too many return
statements within this method. Open
return $response;
Avoid too many return
statements within this method. Open
return array(
'product' => $variations_products,
'plan' => $variations_plans,
);
Avoid too many return
statements within this method. Open
return $response;
The method create() has 204 lines of code. Current threshold is set to 100. Avoid really long methods. Open
function create($post_id, $post, $update, $recreated = false)
{
// Check if the post is a draft
if (strpos(get_post_status($post_id), 'draft') !== false) {
- Exclude checks
The method create() has an NPath complexity of 1291438080. The configured NPath complexity threshold is 200. Open
function create($post_id, $post, $update, $recreated = false)
{
// Check if the post is a draft
if (strpos(get_post_status($post_id), 'draft') !== false) {
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method update() has an NPath complexity of 84672. The configured NPath complexity threshold is 200. Open
function update($post_id)
{
$product = wc_get_product($post_id);
// Check if the post is of the signature type
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method update() has 160 lines of code. Current threshold is set to 100. Avoid really long methods. Open
function update($post_id)
{
$product = wc_get_product($post_id);
// Check if the post is of the signature type
- Exclude checks
The method update() has a Cyclomatic Complexity of 21. The configured cyclomatic complexity threshold is 10. Open
function update($post_id)
{
$product = wc_get_product($post_id);
// Check if the post is of the signature type
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
The method create() has a Cyclomatic Complexity of 38. The configured cyclomatic complexity threshold is 10. Open
function create($post_id, $post, $update, $recreated = false)
{
// Check if the post is a draft
if (strpos(get_post_status($post_id), 'draft') !== false) {
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
The method create has a boolean flag argument $recreated, which is a certain sign of a Single Responsibility Principle violation. Open
function create($post_id, $post, $update, $recreated = 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 using static access to class 'VindiPaymentGateways\VindiConversions' in method 'update'. Open
$trigger_day = VindiConversions::convertTriggerToDay(
$product->get_meta('_subscription_trial_length'),
$product->get_meta('_subscription_trial_period')
);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'VindiPaymentGateways\VindiConversions' in method 'create'. Open
$trigger_day = VindiConversions::convertTriggerToDay(
$product->get_meta('_subscription_trial_length'),
$product->get_meta('_subscription_trial_period')
);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method update uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
set_transient('vindi_product_message', 'error', 60);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'VindiPaymentGateways\VindiConversions' in method 'create'. Open
$plan_interval = VindiConversions::convert_interval($interval_count, $interval_type);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'VindiPaymentGateways\VindiConversions' in method 'create'. Open
$trigger_day = VindiConversions::convertTriggerToDay(
$product->get_meta('_subscription_trial_length'),
$product->get_meta('_subscription_trial_period')
);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'VindiPaymentGateways\VindiConversions' in method 'create'. Open
$plan_interval = VindiConversions::convert_interval($interval_count, $interval_type);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'VindiPaymentGateways\VindiConversions' in method 'update'. Open
$plan_interval = VindiConversions::convert_interval($interval_count, $interval_type);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'VindiPaymentGateways\VindiConversions' in method 'update'. Open
$trigger_day = VindiConversions::convertTriggerToDay(
$product->get_meta('_subscription_trial_length'),
$product->get_meta('_subscription_trial_period')
);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method create uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
set_transient('vindi_product_message', 'error', 60);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'VindiPaymentGateways\VindiConversions' in method 'update'. Open
$plan_interval = VindiConversions::convert_interval($interval_count, $interval_type);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid unused parameters such as '$post'. Open
function create($post_id, $post, $update, $recreated = false)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid unused private fields such as '$types'. Open
private $types;
- Read upRead up
- Exclude checks
UnusedPrivateField
Since: 0.2
Detects when a private field is declared and/or assigned a value, but not used.
Example
class Something
{
private static $FOO = 2; // Unused
private $i = 5; // Unused
private $j = 6;
public function addOne()
{
return $this->j++;
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedprivatefield
Avoid unused parameters such as '$update'. Open
function create($post_id, $post, $update, $recreated = false)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Blank line found at start of control structure Open
if ($product->get_type() == 'variable-subscription') {
- Exclude checks
Visibility must be declared on method "update" Open
function update($post_id)
- Exclude checks
Visibility must be declared on method "__construct" Open
function __construct(VindiSettings $vindi_settings)
- Exclude checks
Visibility must be declared on method "create" Open
function create($post_id, $post, $update, $recreated = false)
- Exclude checks
Blank line found at start of control structure Open
if ($product->get_type() == 'variable-subscription') {
- Exclude checks
Blank line found at start of control structure Open
if (empty($vindi_plan_id)) {
- Exclude checks
Blank line found at start of control structure Open
if ($product->get_type() == 'subscription') {
- Exclude checks
Blank line found at start of control structure Open
if (empty($vindi_plan_id)) {
- Exclude checks
Visibility must be declared on method "trash" Open
function trash($post_id)
- Exclude checks
Visibility must be declared on method "untrash" Open
function untrash($post_id)
- Exclude checks
Line exceeds 120 characters; contains 132 characters Open
'billing_cycles' => ($product->get_meta('_subscription_length') == 0) ? null : $product->get_meta('_subscription_length'),
- Exclude checks
Line exceeds 120 characters; contains 128 characters Open
'billing_cycles' => ($product->get_meta('_subscription_length') == 0) ? null : $product->get_meta('_subscription_length'),
- Exclude checks
Line exceeds 120 characters; contains 130 characters Open
'billing_cycles' => ($product->get_meta('_subscription_length') == 0) ? null : $product->get_meta('_subscription_length'),
- Exclude checks
Line exceeds 120 characters; contains 134 characters Open
'billing_cycles' => ($product->get_meta('_subscription_length') == 0) ? null : $product->get_meta('_subscription_length'),
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 8 Open
$trigger_day = VindiConversions::convertTriggerToDay(
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 10 Open
'status' => ($data['status'] == 'publish') ? 'active' : 'inactive',
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 14 Open
'cycles' => $product->get_meta('_subscription_length'),
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 8 Open
));
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
);
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 6 Open
'status' => ($data['status'] == 'publish') ? 'active' : 'inactive',
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
'product' => $createdProduct,
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 8 Open
$variation_product = wc_get_product($variation['variation_id']);
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 10 Open
$product->get_meta('_subscription_trial_length'),
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 10 Open
$product->get_meta('_subscription_trial_period')
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 20 Open
);
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 10 Open
'plan_items' => array(
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 12 Open
($product->get_meta('_subscription_length') == 0) ? array(
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
$createdPlan = $this->routes->createPlan(array(
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
return $response;
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 10 Open
return;
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 10 Open
$this->routes->findProductById($vindi_product_id) :
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
$product->get_meta('_subscription_trial_period')
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
set_transient('vindi_product_message', 'error', 60);
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 8 Open
$interval_count = $variation_product->get_meta('_subscription_period_interval');
- Exclude checks
Multi-line function call not indented correctly; expected 26 spaces but found 22 Open
array(
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$data = $product->get_data();
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 4 Open
$createdProduct = !empty($vindi_product_id) ?
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 6 Open
'plan_items' => array(
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 8 Open
($product->get_meta('_subscription_length') == 0) ? array(
- 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 ($product->get_type() == 'variable-subscription') {
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
$variations_products = $variations_plans = [];
- Exclude checks
Multi-line function call not indented correctly; expected 26 spaces but found 22 Open
)
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 8 Open
$createdPlan = $this->routes->createPlan(array(
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 10 Open
'interval' => $plan_interval['interval'],
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 10 Open
'interval_count' => $plan_interval['interval_count'],
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 10 Open
'billing_trigger_type' => 'beginning_of_period',
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 8 Open
$variations_plans[$variation['variation_id']] = $createdPlan;
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 14 Open
)
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
set_transient('vindi_product_message', 'created', 60);
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
private $types;
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
function __construct(VindiSettings $vindi_settings)
- Exclude checks
Multi-line function call not indented correctly; expected 26 spaces but found 24 Open
)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$interval_count = $product->get_meta('_subscription_period_interval');
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
'plan' => $createdPlan,
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$this->routes = $vindi_settings->routes;
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if (get_post_type($post_id) != 'product') {
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
return;
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 8 Open
);
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 14 Open
'product_id' => $createdProduct['id']
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 10 Open
}
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
);
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
private $routes;
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 14 Open
'product_id' => $createdProduct['id']
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 14 Open
update_post_meta($post_id, 'vindi_plan_id', $createdPlan['id']);
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
add_action('wp_trash_post', array($this, 'trash'), 10, 1);
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$product = wc_get_product($post_id);
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 12 Open
) : array(
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 10 Open
),
- Exclude checks
Line indented incorrectly; expected 24 spaces, found 22 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$interval_type = $product->get_meta('_subscription_period');
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 6 Open
'name' => VINDI_PREFIX_PLAN . $data['name'],
- 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 16 spaces, found 8 Open
$data = $variation_product->get_data();
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 4 Open
$vindi_product_id = get_post_meta($post_id, 'vindi_product_id', true);
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 14 Open
array(
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 6 Open
'interval' => $plan_interval['interval'],
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 6 Open
'billing_trigger_type' => 'beginning_of_period',
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 6 Open
'billing_trigger_day' => $trigger_day,
- Exclude checks
Line indented incorrectly; expected at least 14 spaces, found 12 Open
update_post_meta($post_id, 'vindi_product_id', $createdProduct['id']);
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 4 Open
if ($createdPlan && $createdProduct) {
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$this->logger = $vindi_settings->logger;
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
$variations = $product->get_available_variations();
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 8 Open
$createdProduct = !empty($vindi_product_id) ?
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
$product->get_meta('_subscription_trial_length'),
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 6 Open
'interval_count' => $plan_interval['interval_count'],
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 6 Open
'billing_cycles' => ($product->get_meta('_subscription_length') == 0) ? null : $product->get_meta('_subscription_length'),
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
function update($post_id)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
add_action('wp_insert_post', array($this, 'create'), 10, 3);
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 10 Open
$product->get_meta('_subscription_trial_length'),
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 10 Open
$product->get_meta('_subscription_trial_period')
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 10 Open
'name' => VINDI_PREFIX_PLAN . $data['name'],
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
return array(
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
$product->get_meta('_subscription_trial_period')
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
$this->routes->findProductById($vindi_product_id) :
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 8 Open
)
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
));
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 10 Open
}
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 8 Open
$plan_interval = VindiConversions::convert_interval($interval_count, $interval_type);
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 12 Open
)
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
'product' => $variations_products,
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
'plan' => $variations_plans,
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
add_action('untrash_post', array($this, 'untrash'), 10, 1);
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
return;
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 8 Open
$vindi_product_id = get_post_meta($post_id, 'vindi_product_id', true);
- Exclude checks
Multi-line function call not indented correctly; expected 22 spaces but found 20 Open
);
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 10 Open
'code' => 'WC-' . $data['id'],
- 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
$trigger_day = VindiConversions::convertTriggerToDay(
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
$product->get_meta('_subscription_trial_length'),
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 8 Open
) : array(
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 4 Open
$response = array(
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
function create($post_id, $post, $update, $recreated = false)
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 6 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$plan_interval = VindiConversions::convert_interval($interval_count, $interval_type);
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 4 Open
} else {
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if (strpos(get_post_status($post_id), 'draft') !== false) {
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 6 Open
foreach ($variations as $variation) {
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 8 Open
$interval_type = $variation_product->get_meta('_subscription_period');
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 10 Open
'billing_trigger_day' => $trigger_day,
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 10 Open
'billing_cycles' => ($product->get_meta('_subscription_length') == 0) ? null : $product->get_meta('_subscription_length'),
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 8 Open
$variations_products[$variation['variation_id']] = $createdProduct;
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 6 Open
'code' => 'WC-' . $data['id'],
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 6 Open
),
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 8 Open
$updatedProduct = $this->routes->updateProduct(
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
);
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
'plan' => $updatedPlan,
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$inactivatedProduct = $this->routes->updateProduct($vindi_product_id, array(
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 8 Open
if (empty($vindi_plan_id)) {
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 8 Open
);
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 10 Open
$vindi_product_id,
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 10 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
$data = $product->get_data();
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$trigger_day = VindiConversions::convertTriggerToDay(
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
$vindi_product_id = get_post_meta($post_id, 'vindi_product_id', true);
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
$vindi_plan_id,
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
)
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
$inactivatedPlan = $this->routes->updatePlan($vindi_plan_id, array(
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
));
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 8 Open
$variation_product = wc_get_product($variation['variation_id']);
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 8 Open
$interval_type = $variation_product->get_meta('_subscription_period');
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 10 Open
$vindi_plan_id,
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 12 Open
'interval' => $plan_interval['interval'],
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 6 Open
array(
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
array(
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
'billing_trigger_type' => 'beginning_of_period',
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
'code' => 'WC-' . $data['id'],
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
));
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 8 Open
'pricing_schema' => array(
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 10 Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
'name' => VINDI_PREFIX_PLAN . $data['name'],
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 10 Open
array(
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 12 Open
'name' => VINDI_PREFIX_PRODUCT . $data['name'],
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 12 Open
'code' => 'WC-' . $data['id'],
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 14 Open
'schema_type' => 'flat',
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 8 Open
);
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 12 Open
'interval_count' => $plan_interval['interval_count'],
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 8 Open
);
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$interval_count = $product->get_meta('_subscription_period_interval');
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
);
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
$vindi_product_id,
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
'interval' => $plan_interval['interval'],
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$vindi_plan_id = get_post_meta($product->id, 'vindi_plan_id', true);
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
return array(
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$product = wc_get_product($post_id);
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if ($product->get_type() == 'variable-subscription') {
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 10 Open
return $this->create($post_id, '', '', true);
- Exclude checks
Line indented incorrectly; expected at least 20 spaces, found 10 Open
break;
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 10 Open
array(
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 12 Open
'billing_cycles' => ($product->get_meta('_subscription_length') == 0) ? null : $product->get_meta('_subscription_length'),
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 10 Open
return;
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 8 Open
$vindi_plan_id = get_post_meta($variation['variation_id'], 'vindi_plan_id', true);
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 10 Open
$product->get_meta('_subscription_trial_length'),
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 10 Open
$vindi_plan_id,
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 10 Open
array(
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 6 Open
$vindi_product_id,
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
);
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
'interval_count' => $plan_interval['interval_count'],
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
'billing_cycles' => ($product->get_meta('_subscription_length') == 0) ? null : $product->get_meta('_subscription_length'),
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 4 Open
$response = array(
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 6 Open
'product' => $inactivatedProduct,
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
$variations_products = $variations_plans = [];
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 6 Open
foreach ($variations as $variation) {
- Exclude checks
Line indented incorrectly; expected 16 spaces, found 8 Open
}
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 8 Open
$updatedPlan = $this->routes->updatePlan(
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 8 Open
'status' => ($data['status'] == 'publish') ? 'active' : 'inactive',
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
$vindi_plan_id = get_post_meta($post_id, 'vindi_plan_id', true);
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
array(
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
)
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 8 Open
$interval_count = $variation_product->get_meta('_subscription_period_interval');
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 12 Open
'invoice' => 'always',
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 10 Open
)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$interval_type = $product->get_meta('_subscription_period');
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
'status' => ($data['status'] == 'publish') ? 'active' : 'inactive',
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
);
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
function trash($post_id)
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
return;
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 10 Open
)
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 8 Open
$variations_plans[$variation['variation_id']] = $updatedPlan;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
$product->get_meta('_subscription_trial_length'),
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
return $response;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$vindi_product_id = get_post_meta($product->id, 'vindi_product_id', true);
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
'status' => 'inactive',
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 8 Open
return $this->create($post_id, '', '', true);
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 8 Open
$data = $variation_product->get_data();
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 8 Open
$trigger_day = VindiConversions::convertTriggerToDay(
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 10 Open
array(
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 12 Open
'status' => ($data['status'] == 'publish') ? 'active' : 'inactive',
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 10 Open
)
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
'product' => $variations_products,
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
array(
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$product = wc_get_product($post_id);
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 12 Open
'code' => 'WC-' . $data['id'],
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
$product->get_meta('_subscription_trial_length'),
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 8 Open
'invoice' => 'always',
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 8 Open
)
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
'billing_trigger_day' => $trigger_day,
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 4 Open
} else {
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if ($product->get_type() == 'subscription') {
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 6 Open
}
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 10 Open
$product->get_meta('_subscription_trial_period')
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 10 Open
$product->get_meta('_subscription_trial_period')
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 12 Open
'billing_trigger_day' => $trigger_day,
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
return array(
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
$product->get_meta('_subscription_trial_period')
- Exclude checks
Multi-line function call not indented correctly; expected 8 spaces but found 6 Open
)
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 6 Open
)
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if (get_post_type($post_id) != 'product') {
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 8 Open
$plan_interval = VindiConversions::convert_interval($interval_count, $interval_type);
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 10 Open
$vindi_product_id,
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 12 Open
'pricing_schema' => array(
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 8 Open
$variations_products[$variation['variation_id']] = $updatedProduct;
- Exclude checks
Line indented incorrectly; expected at least 4 spaces, found 2 Open
{
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 6 Open
'status' => 'inactive',
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
function untrash($post_id)
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
);
- Exclude checks
Line indented incorrectly; expected 12 spaces, found 6 Open
if (empty($vindi_plan_id)) {
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 8 Open
$vindi_product_id = get_post_meta($variation['variation_id'], 'vindi_product_id', true);
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 10 Open
$product->get_meta('_subscription_trial_length'),
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 14 Open
'price' => ($data['price']) ? $data['price'] : 0,
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 12 Open
)
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
$product->get_meta('_subscription_trial_period')
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 8 Open
'code' => 'WC-' . $data['id'],
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
$vindi_plan_id,
- Exclude checks
Line indented incorrectly; expected 10 spaces, found 4 Open
if ($updatedPlan && $updatedProduct) {
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 6 Open
set_transient('vindi_product_message', 'error', 60);
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
);
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if (empty($vindi_product_id) || empty($vindi_plan_id)) {
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
return;
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
);
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if (get_post_type($post_id) != 'product') {
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$vindi_plan_id = get_post_meta($product->id, 'vindi_plan_id', true);
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
if (empty($vindi_product_id) || empty($vindi_plan_id)) {
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
return;
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
$vindi_plan_id = get_post_meta($post_id, 'vindi_plan_id', true);
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
$variations = $product->get_available_variations();
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 12 Open
'name' => VINDI_PREFIX_PLAN . $data['name'],
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 12 Open
'billing_trigger_type' => 'beginning_of_period',
- Exclude checks
Line indented incorrectly; expected at least 22 spaces, found 12 Open
'status' => ($data['status'] == 'publish') ? 'active' : 'inactive',
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 8 Open
'plan' => $variations_plans,
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$plan_interval = VindiConversions::convert_interval($interval_count, $interval_type);
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
$updatedProduct = $this->routes->updateProduct(
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 8 Open
'name' => VINDI_PREFIX_PRODUCT . $data['name'],
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 4 Open
$updatedPlan = $this->routes->updatePlan(
- Exclude checks
Line indented incorrectly; expected at least 14 spaces, found 6 Open
set_transient('vindi_product_message', 'updated', 60);
- Exclude checks
Line indented incorrectly; expected at least 12 spaces, found 6 Open
'product' => $updatedProduct,
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$activatedProduct = $this->routes->updateProduct($vindi_product_id, array(
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$product = wc_get_product($post_id);
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 6 Open
'plan' => $activatedPlan,
- Exclude checks
Line indented incorrectly; expected 8 spaces, found 4 Open
}
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
));
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
$vindi_product_id = get_post_meta($product->id, 'vindi_product_id', true);
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 2 Open
}
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 6 Open
'plan' => $inactivatedPlan,
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
return array(
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 6 Open
'status' => 'active',
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 6 Open
'status' => 'active',
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 4 Open
$activatedPlan = $this->routes->updatePlan($vindi_plan_id, array(
- Exclude checks
Line indented incorrectly; expected at least 10 spaces, found 6 Open
'product' => $activatedProduct,
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
));
- 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
Line indented incorrectly; expected at least 12 spaces, found 6 Open
return;
- Exclude checks