vindi/vindi-woocommerce

View on GitHub
src/validators/Dependencies.php

Summary

Maintainability
A
3 hrs
Test Coverage

Showing 13 of 13 total issues

Method check has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

public static function check()
{
if(!self::check_critical_dependencies()) {
return false;
}
Severity: Minor
Found in src/validators/Dependencies.php - About 1 hr to fix

    Method check_critical_dependencies has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    public static function check_critical_dependencies()
    {
    $critical_dependencies = [
    [
    'name' => 'PHP',
    Severity: Minor
    Found in src/validators/Dependencies.php - About 1 hr to fix

      Avoid using undefined variables such as '$plugin' which will lead to PHP notices.
      Open

      array_push($errors, $plugin);
      Severity: Minor
      Found in src/validators/Dependencies.php by phpmd

      Avoid unused parameters such as '$version'.
      Open

      public static function missing_notice($name, $version, $link)
      Severity: Minor
      Found in src/validators/Dependencies.php by phpmd

      Avoid unused parameters such as '$link'.
      Open

      public static function missing_notice($name, $version, $link)
      Severity: Minor
      Found in src/validators/Dependencies.php by phpmd

      Avoid unused local variables such as '$plugin'.
      Open

      array_push($errors, $plugin);
      Severity: Minor
      Found in src/validators/Dependencies.php by phpmd

      Avoid unused parameters such as '$version'.
      Open

      public static function critical_dependency_missing_notice($name, $version)
      Severity: Minor
      Found in src/validators/Dependencies.php by phpmd

      Avoid unused parameters such as '$name'.
      Open

      public static function missing_notice($name, $version, $link)
      Severity: Minor
      Found in src/validators/Dependencies.php by phpmd

      Avoid unused parameters such as '$name'.
      Open

      public static function critical_dependency_missing_notice($name, $version)
      Severity: Minor
      Found in src/validators/Dependencies.php by phpmd

      The property $active_plugins is not named in camelCase.
      Open

      class VindiDependencies
      {
      /**
      * @var array
      */
      Severity: Minor
      Found in src/validators/Dependencies.php by phpmd

      A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 9 and the first side effect is on line 6.
      Open

      <?php

      Expected 1 space after IF keyword; 0 found
      Open

      if(!empty($errors)) {

      Expected 1 space after IF keyword; 0 found
      Open

      if(!self::check_critical_dependencies()) {

      There are no issues that match your filters.

      Category
      Status