Function order_fully_refunded
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
public function order_fully_refunded($order)
{
if (!is_object($order)) {
$order = wc_get_order($order);
}
Function order_canceled
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
public function order_canceled($order)
{
if (!is_object($order)) {
$order = wc_get_order($order);
}
Function filter_pre_status
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
public function filter_pre_status($wc_subscription, $new_status, $old_status)
{
switch ($new_status) {
case 'on-hold':
$this->suspend_status($wc_subscription);
Avoid unused local variables such as '$item'.
foreach ($vindi_order as $key => $item) {
The property $vindi_settings is not named in camelCase.
class VindiSubscriptionStatusHandler
{
* @var VindiSettings
*/
Only one argument is allowed per line in a multi-line function call
), array('a' => array('href' => true))));
Line exceeds 120 characters; contains 127 characters
if (wcs_get_objects_property($order, 'id') == $latest_order && $subscription->can_be_updated_to('cancelled')) {
Line exceeds 120 characters; contains 126 characters
sprintf('<a href="%s">', esc_url(wcs_get_edit_post_link(wcs_get_objects_property($order, 'id')))),
Line exceeds 120 characters; contains 152 characters
$subscriptions = wcs_get_subscriptions_for_order(wcs_get_objects_property($order, 'id'), array('order_type' => array('parent', 'renewal')));
Closing parenthesis of a multi-line function call must be on a line by itself
), array('a' => array('href' => true))));
Multi-line function call not indented correctly; expected 20 spaces but found 24
), array('a' => array('href' => true))));
There are no issues that match your filters.