YetiForceCompany/YetiForceCRM

View on GitHub
app/Installer/Credits.php

Summary

Maintainability
D
2 days
Test Coverage
F
0%

Function getLicenseInformation has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
Open

    public static function getLicenseInformation($dir, $libraryName)
    {
        $licenseError = false;
        $returnLicense = '';
        $licenseToDisplay = '';
Severity: Minor
Found in app/Installer/Credits.php - About 6 hrs to fix

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 getVendorLibraries has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
Open

    public static function getVendorLibraries()
    {
        $libraries = [];
        if (file_exists(ROOT_DIRECTORY . '/composer.lock')) {
            $composerLock = \App\Json::decode(file_get_contents(ROOT_DIRECTORY . '/composer.lock'), true);
Severity: Minor
Found in app/Installer/Credits.php - About 4 hrs to fix

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 class Credits has an overall complexity of 56 which is very high. The configured complexity threshold is 50.
Open

class Credits
{
    /**
     * Library json files.
     *
Severity: Minor
Found in app/Installer/Credits.php by phpmd

Function getYarnLibraries has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

    public static function getYarnLibraries(string $integrityFile, string $srcDir): array
    {
        $libraries = [];
        if (file_exists($integrityFile)) {
            $yarnFile = \App\Json::decode(file_get_contents($integrityFile), true);
Severity: Minor
Found in app/Installer/Credits.php - About 2 hrs to fix

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

Method getLicenseInformation has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function getLicenseInformation($dir, $libraryName)
    {
        $licenseError = false;
        $returnLicense = '';
        $licenseToDisplay = '';
Severity: Minor
Found in app/Installer/Credits.php - About 2 hrs to fix

    Function getLibraryValues has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function getLibraryValues($name, $dir): array
        {
            $library = ['name' => $name, 'version' => '', 'license' => '', 'homepage' => ''];
            $existJsonFiles = true;
            foreach (self::$jsonFiles as $file) {
    Severity: Minor
    Found in app/Installer/Credits.php - About 1 hr to fix

    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

    Method getBasicLibraries has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function getBasicLibraries(): array
        {
            return [
                'YetiForce' => [
                    'name' => 'YetiForce',
    Severity: Minor
    Found in app/Installer/Credits.php - About 1 hr to fix

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

          public static function getVendorLibraries()
          {
              $libraries = [];
              if (file_exists(ROOT_DIRECTORY . '/composer.lock')) {
                  $composerLock = \App\Json::decode(file_get_contents(ROOT_DIRECTORY . '/composer.lock'), true);
      Severity: Minor
      Found in app/Installer/Credits.php - About 1 hr to fix

        Method getLibraryValues has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static function getLibraryValues($name, $dir): array
            {
                $library = ['name' => $name, 'version' => '', 'license' => '', 'homepage' => ''];
                $existJsonFiles = true;
                foreach (self::$jsonFiles as $file) {
        Severity: Minor
        Found in app/Installer/Credits.php - About 1 hr to fix

          Function validateLicenseName has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              public static function validateLicenseName($license)
              {
                  if (!$license) {
                      return true;
                  }
          Severity: Minor
          Found in app/Installer/Credits.php - About 25 mins to fix

          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 getVendorLibraries() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
          Open

              public static function getVendorLibraries()
              {
                  $libraries = [];
                  if (file_exists(ROOT_DIRECTORY . '/composer.lock')) {
                      $composerLock = \App\Json::decode(file_get_contents(ROOT_DIRECTORY . '/composer.lock'), true);
          Severity: Minor
          Found in app/Installer/Credits.php by phpmd

          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 getLicenseInformation() has a Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10.
          Open

              public static function getLicenseInformation($dir, $libraryName)
              {
                  $licenseError = false;
                  $returnLicense = '';
                  $licenseToDisplay = '';
          Severity: Minor
          Found in app/Installer/Credits.php by phpmd

          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

          Refactor this function to reduce its Cognitive Complexity from 41 to the 15 allowed.
          Open

              public static function getLicenseInformation($dir, $libraryName)
          Severity: Critical
          Found in app/Installer/Credits.php by sonar-php

          Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

          See

          Refactor this function to reduce its Cognitive Complexity from 24 to the 15 allowed.
          Open

              public static function getYarnLibraries(string $integrityFile, string $srcDir): array
          Severity: Critical
          Found in app/Installer/Credits.php by sonar-php

          Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

          See

          Refactor this function to reduce its Cognitive Complexity from 30 to the 15 allowed.
          Open

              public static function getVendorLibraries()
          Severity: Critical
          Found in app/Installer/Credits.php by sonar-php

          Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

          See

          Avoid using static access to class '\App\Json' in method 'getYarnLibraries'.
          Open

                      $yarnFile = \App\Json::decode(file_get_contents($integrityFile), true);
          Severity: Minor
          Found in app/Installer/Credits.php by phpmd

          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 getLicenseInformation uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                              } else {
                                  $licenseError = self::validateLicenseName($license);
                                  $returnLicense = $license;
                              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpmd

          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

          The method getLicenseInformation uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                                  } else {
                                      $returnLicense = implode(', ', $license);
                                  }
          Severity: Minor
          Found in app/Installer/Credits.php by phpmd

          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 '\App\Json' in method 'getVendorLibraries'.
          Open

                      $composerLock = \App\Json::decode(file_get_contents(ROOT_DIRECTORY . '/composer.lock'), true);
          Severity: Minor
          Found in app/Installer/Credits.php by phpmd

          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 getLicenseInformation uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                          } else {
                              if (isset(static::$licenses[$libraryName])) {
                                  $returnLicense = static::$licenses[$libraryName];
                                  $showLicenseModal = file_exists($dir . '..' . \DIRECTORY_SEPARATOR . 'licenses' . \DIRECTORY_SEPARATOR . $returnLicense . '.txt');
                              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpmd

          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

          The method getLicenseInformation uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                      } else {
                          if (isset(static::$licenses[$libraryName])) {
                              $returnLicense = static::$licenses[$libraryName];
                              $showLicenseModal = file_exists($dir . '..' . \DIRECTORY_SEPARATOR . 'licenses' . \DIRECTORY_SEPARATOR . $returnLicense . '.txt');
                          }
          Severity: Minor
          Found in app/Installer/Credits.php by phpmd

          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 '\App\Json' in method 'getLicenseInformation'.
          Open

                          $packageFileContent = \App\Json::decode(file_get_contents($packageFile), true);
          Severity: Minor
          Found in app/Installer/Credits.php by phpmd

          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 getVendorLibraries uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                                  } else {
                                      $libraries[$package['name']]['license'] = $package['license'][0];
                                      $libraries[$package['name']]['showLicenseModal'] = self::checkIfLicenseFileExists($package['license'][0]);
                                  }
          Severity: Minor
          Found in app/Installer/Credits.php by phpmd

          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 '\App\Json' in method 'getVueLibs'.
          Open

                      foreach (\App\Json::read($file) as $name => $libDetails) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpmd

          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 '\App\Json' in method 'getLibraryValues'.
          Open

                          $packageFileContent = \App\Json::decode(file_get_contents($packageFile), true);
          Severity: Minor
          Found in app/Installer/Credits.php by phpmd

          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 '\App\Version' in method 'getBasicLibraries'.
          Open

                          'version' => \App\Version::get(),
          Severity: Minor
          Found in app/Installer/Credits.php by phpmd

          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

          Define a constant instead of duplicating this literal "homepage" 16 times.
          Open

                          'homepage' => 'https://yetiforce.com/en/yetiforce/license',
          Severity: Critical
          Found in app/Installer/Credits.php by sonar-php

          Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

          On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

          Noncompliant Code Example

          With the default threshold of 3:

          function run() {
            prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
            execute('action1');
            release('action1');
          }
          

          Compliant Solution

          ACTION_1 = 'action1';
          
          function run() {
            prepare(ACTION_1);
            execute(ACTION_1);
            release(ACTION_1);
          }
          

          Exceptions

          To prevent generating some false-positives, literals having less than 5 characters are excluded.

          Define a constant instead of duplicating this literal "licenses" 6 times.
          Open

                          $license = $packageFileContent['license'] ?? $packageFileContent['licenses'] ?? '';
          Severity: Critical
          Found in app/Installer/Credits.php by sonar-php

          Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

          On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

          Noncompliant Code Example

          With the default threshold of 3:

          function run() {
            prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
            execute('action1');
            release('action1');
          }
          

          Compliant Solution

          ACTION_1 = 'action1';
          
          function run() {
            prepare(ACTION_1);
            execute(ACTION_1);
            release(ACTION_1);
          }
          

          Exceptions

          To prevent generating some false-positives, literals having less than 5 characters are excluded.

          Define a constant instead of duplicating this literal "notPackageFile" 4 times.
          Open

                          'notPackageFile' => true,
          Severity: Critical
          Found in app/Installer/Credits.php by sonar-php

          Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

          On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

          Noncompliant Code Example

          With the default threshold of 3:

          function run() {
            prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
            execute('action1');
            release('action1');
          }
          

          Compliant Solution

          ACTION_1 = 'action1';
          
          function run() {
            prepare(ACTION_1);
            execute(ACTION_1);
            release(ACTION_1);
          }
          

          Exceptions

          To prevent generating some false-positives, literals having less than 5 characters are excluded.

          Define a constant instead of duplicating this literal "licenseError" 3 times.
          Open

                                      $libraries[$package['name']]['licenseError'] = true;
          Severity: Critical
          Found in app/Installer/Credits.php by sonar-php

          Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

          On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

          Noncompliant Code Example

          With the default threshold of 3:

          function run() {
            prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
            execute('action1');
            release('action1');
          }
          

          Compliant Solution

          ACTION_1 = 'action1';
          
          function run() {
            prepare(ACTION_1);
            execute(ACTION_1);
            release(ACTION_1);
          }
          

          Exceptions

          To prevent generating some false-positives, literals having less than 5 characters are excluded.

          Define a constant instead of duplicating this literal "licenseToDisplay" 3 times.
          Open

                      $library['licenseToDisplay'] = $license['licenseToDisplay'];
          Severity: Critical
          Found in app/Installer/Credits.php by sonar-php

          Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

          On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

          Noncompliant Code Example

          With the default threshold of 3:

          function run() {
            prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
            execute('action1');
            release('action1');
          }
          

          Compliant Solution

          ACTION_1 = 'action1';
          
          function run() {
            prepare(ACTION_1);
            execute(ACTION_1);
            release(ACTION_1);
          }
          

          Exceptions

          To prevent generating some false-positives, literals having less than 5 characters are excluded.

          Define a constant instead of duplicating this literal "description" 3 times.
          Open

                          'description' => 'LBL_VTIGER_DESCRIPTION',
          Severity: Critical
          Found in app/Installer/Credits.php by sonar-php

          Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

          On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

          Noncompliant Code Example

          With the default threshold of 3:

          function run() {
            prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
            execute('action1');
            release('action1');
          }
          

          Compliant Solution

          ACTION_1 = 'action1';
          
          function run() {
            prepare(ACTION_1);
            execute(ACTION_1);
            release(ACTION_1);
          }
          

          Exceptions

          To prevent generating some false-positives, literals having less than 5 characters are excluded.

          Define a constant instead of duplicating this literal "license" 19 times.
          Open

                          'license' => 'YetiForce Public License 6.5',
          Severity: Critical
          Found in app/Installer/Credits.php by sonar-php

          Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

          On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

          Noncompliant Code Example

          With the default threshold of 3:

          function run() {
            prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
            execute('action1');
            release('action1');
          }
          

          Compliant Solution

          ACTION_1 = 'action1';
          
          function run() {
            prepare(ACTION_1);
            execute(ACTION_1);
            release(ACTION_1);
          }
          

          Exceptions

          To prevent generating some false-positives, literals having less than 5 characters are excluded.

          Define a constant instead of duplicating this literal "showLicenseModal" 9 times.
          Open

                          'showLicenseModal' => true,
          Severity: Critical
          Found in app/Installer/Credits.php by sonar-php

          Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

          On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

          Noncompliant Code Example

          With the default threshold of 3:

          function run() {
            prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
            execute('action1');
            release('action1');
          }
          

          Compliant Solution

          ACTION_1 = 'action1';
          
          function run() {
            prepare(ACTION_1);
            execute(ACTION_1);
            release(ACTION_1);
          }
          

          Exceptions

          To prevent generating some false-positives, literals having less than 5 characters are excluded.

          Define a constant instead of duplicating this literal "version" 12 times.
          Open

                          'version' => \App\Version::get(),
          Severity: Critical
          Found in app/Installer/Credits.php by sonar-php

          Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

          On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

          Noncompliant Code Example

          With the default threshold of 3:

          function run() {
            prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
            execute('action1');
            release('action1');
          }
          

          Compliant Solution

          ACTION_1 = 'action1';
          
          function run() {
            prepare(ACTION_1);
            execute(ACTION_1);
            release(ACTION_1);
          }
          

          Exceptions

          To prevent generating some false-positives, literals having less than 5 characters are excluded.

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

                          foreach ($yarnFile['lockfileEntries'] as $nameWithVersion => $page) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpmd

          UnusedLocalVariable

          Since: 0.2

          Detects when a local variable is declared and/or assigned, but not used.

          Example

          class Foo {
              public function doSomething()
              {
                  $i = 5; // Unused
              }
          }

          Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

          Argument 2 (objectDecodeType) is true but \App\Json::decode() takes int defined at /code/app/Json.php:37
          Open

                      $composerLock = \App\Json::decode(file_get_contents(ROOT_DIRECTORY . '/composer.lock'), true);
          Severity: Minor
          Found in app/Installer/Credits.php by phan

          Argument 2 (objectDecodeType) is true but \App\Json::decode() takes int defined at /code/app/Json.php:37
          Open

                          $packageFileContent = \App\Json::decode(file_get_contents($packageFile), true);
          Severity: Minor
          Found in app/Installer/Credits.php by phan

          Argument 2 (objectDecodeType) is true but \App\Json::decode() takes int defined at /code/app/Json.php:37
          Open

                          $packageFileContent = \App\Json::decode(file_get_contents($packageFile), true);
          Severity: Minor
          Found in app/Installer/Credits.php by phan

          Argument 2 (objectDecodeType) is true but \App\Json::decode() takes int defined at /code/app/Json.php:37
          Open

                      $yarnFile = \App\Json::decode(file_get_contents($integrityFile), true);
          Severity: Minor
          Found in app/Installer/Credits.php by phan

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @var array
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  'bootstrap-tabdrop' => 'Apache-2.0',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  'ckeditor/ckeditor' => 'MPL-1.1+',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  'html5shiv' => 'MIT',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      ],
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'name' => 'Vtiger',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Information about libraries license.
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  'block-ui' => 'MIT',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      'Vtiger' => [
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'showLicenseModal' => true,
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'description' => 'LBL_VTIGER_DESCRIPTION',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'license' => 'SPL-1.1.2',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Library json files.
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function getBasicLibraries(): array
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      'YetiForce' => [
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'version' => '',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              ];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  'nette/utils' => 'BSD-3-Clause',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  'domhandler' => 'BSD-2-Clause',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'license' => 'YetiForce Public License 6.5',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'homepage' => 'https://yetiforce.com/en/yetiforce/license',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      'Sugar' => [
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static $licenses = [
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  'color-convert' => 'MIT',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  '@mdi/font' => 'MIT',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'notPackageFile' => true,
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'name' => 'Sugar CRM',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  'domutils' => 'BSD-2-Clause',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'notPackageFile' => true,
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'showLicenseModal' => true,
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'version' => '6.4.0 rev. 14548',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Function gets libraries name from public_html.
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @return array
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if ($yarnFile && $yarnFile['lockfileEntries']) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  $libraries[$name] = self::getLibraryValues($name, $srcDir);
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @throws \App\Exceptions\AppException
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      foreach (\App\Json::read($file) as $name => $libDetails) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $packageFile = $dir . $name . \DIRECTORY_SEPARATOR . $file;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'name' => 'YetiForce',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      'ChatSound' => [
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'name' => 'Notification Sounds - Time Is Now',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'license' => 'CC-BY-4.0',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          foreach ($composerLock['packages'] as $package) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . 'public_html' . \DIRECTORY_SEPARATOR . 'libraries' . \DIRECTORY_SEPARATOR
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param string $dir
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      ],
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Line exceeds 120 characters; contains 144 characters
          Open

                                  $libraries[$package['name']]['homepage'] = $package['homepage'] ?? 'https://packagist.org/packages/' . $package['name'];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  $libraries[$package['name']]['homepage'] = 'https://packagist.org/packages/' . $package['name'];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @return array
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function getYarnLibraries(string $integrityFile, string $srcDir): array
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $isPrefix = 0 === strpos($nameWithVersion, '@');
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @return array
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if (file_exists($file)) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $existJsonFiles = true;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  'fontawesome-web' => 'MIT',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      ],
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $libraryDir = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . 'vendor' . \DIRECTORY_SEPARATOR;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Line exceeds 120 characters; contains 134 characters
          Open

                                      $libraries[$package['name']]['showLicenseModal'] = self::checkIfLicenseFileExists($package['license'][0]);
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          foreach ($yarnFile['lockfileEntries'] as $nameWithVersion => $page) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static $jsonFiles = ['package.json', 'composer.json', 'bower.json'];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Information about forks CRM.
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'version' => \App\Version::get(),
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'license' => 'VPL 1.1', 'homepage' => 'https://www.vtiger.com/',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'version' => '',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              if (!empty($package['homepage'])) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  );
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function getVueLibs(): array
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Function return library values.
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @return array
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return [
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'notPackageFile' => true,
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              if (!empty($package['version'])) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                      $libraries[$package['name']]['licenseError'] = true;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'notPackageFile' => true,
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'showLicenseModal' => false,
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function getVendorLibraries()
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if ($composerLock && $composerLock['packages']) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Line exceeds 120 characters; contains 146 characters
          Open

                      ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . 'public_html' . \DIRECTORY_SEPARATOR . 'libraries' . \DIRECTORY_SEPARATOR . '.yarn-integrity',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $file = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . 'app_data' . \DIRECTORY_SEPARATOR . 'libraries.json';
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $existJsonFiles = false;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          if (!empty($packageFileContent['version']) && empty($library['version'])) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          if (!empty($packageFileContent['homepage']) && empty($library['homepage'])) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'homepage' => 'https://www.sugarcrm.com/',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Line exceeds 120 characters; contains 143 characters
          Open

                                  $libraries[$package['name']]['showLicenseModal'] = self::checkIfLicenseFileExists(static::$licenses[$package['name']]);
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return self::getYarnLibraries(
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . 'public_html' . \DIRECTORY_SEPARATOR . 'libraries' . \DIRECTORY_SEPARATOR . '.yarn-integrity',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  if (empty($libraries[$name]['homepage'])) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @var string[]
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  'jquery-lazy' => 'MIT',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'showLicenseModal' => true,
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @return array
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                      $libraries[$package['name']]['showLicenseModal'] = self::checkIfLicenseFileExists($package['license'][0]);
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Line exceeds 120 characters; contains 157 characters
          Open

                                  $libraries[$package['name']]['license'] = static::$licenses[$package['name']] . ' [' . $libraries[$package['name']]['license'] . ']';
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $libraries = [];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                      $libraries[$name]['homepage'] = "https://yarnpkg.com/en/package/{$name}";
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $library['version'] = $packageFileContent['version'];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  '@fortawesome/fontawesome-free' => 'MIT',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  'jquery-slimscroll' => 'MIT',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  'nette/php-generator' => 'BSD-3-Clause',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  '@vue/compiler-sfc' => 'MIT',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @return array
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      ], ];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  $libraries[$package['name']]['version'] = $package['version'];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                      $libraries[$package['name']]['license'] = $package['license'][0];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @throws \App\Exceptions\AppException
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $libraries[$name] = $libDetails;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $library = ['name' => $name, 'version' => '', 'license' => '', 'homepage' => ''];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $library['homepage'] = $packageFileContent['homepage'];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $library['showLicenseModal'] = $license['showLicenseModal'];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function getLicenseInformation($dir, $libraryName)
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $returnLicense = static::$licenses[$libraryName];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if (!$license) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'description' => 'LBL_SUGAR_DESCRIPTION',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @throws \App\Exceptions\AppException
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  if (\count($package['license']) > 1) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  $libraries[$package['name']]['licenseError'] = false;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return $libraries;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Function gets vue libraries name.
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param string $name
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function getLibraryValues($name, $dir): array
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $licenseError = false;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $packageFileContent = \App\Json::decode(file_get_contents($packageFile), true);
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              } else {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @return bool
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function checkIfLicenseFileExists($license)
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $filePath = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . 'licenses' . \DIRECTORY_SEPARATOR . $license . '.txt';
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Function returns information abouts libraries.
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'description' => 'LBL_CHAT_SOUND_DESCRIPTION',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Function gets libraries from vendor.
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $composerLock = \App\Json::decode(file_get_contents(ROOT_DIRECTORY . '/composer.lock'), true);
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $libraries[$package['name']] = self::getLibraryValues($package['name'], $libraryDir);
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  } else {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return $libraries;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if (file_exists($packageFile)) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $license = self::getLicenseInformation($dir, $name);
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  $returnLicense = $license;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      } else {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      return true;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $result = false;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Function checks if license file existsF.
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $libraries = [];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                      $libraries[$package['name']]['license'] = implode(', ', $package['license']);
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              if (isset(static::$licenses[$package['name']])) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function getPublicLibraries()
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Line exceeds 120 characters; contains 125 characters
          Open

                      ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . 'public_html' . \DIRECTORY_SEPARATOR . 'libraries' . \DIRECTORY_SEPARATOR
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          'homepage' => 'https://notificationsounds.com/notification-sounds/time-is-now-585',
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Get libraries based on .yarn-integrity file.
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              if (!empty($package['license'])) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if (file_exists($integrityFile)) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  $libraries[$package['name']]['homepage'] = $package['homepage'] ?? 'https://packagist.org/packages/' . $package['name'];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $tempName = explode('@', $isPrefix ? ltrim($nameWithVersion, '@') : $nameWithVersion);
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              } elseif (empty($libraries[$package['name']]['homepage'])) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $libraries = [];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param string $integrityFile
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param string $srcDir
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $name .= array_shift($tempName);
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $library['licenseToDisplay'] = $license['licenseToDisplay'];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Function return license information for library.
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          if ($license) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                      $returnLicense = implode(', ', $license);
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              if (isset(static::$licenses[$libraryName]) && $returnLicense) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @return array
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  $licenseToDisplay = static::$licenses[$libraryName];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              if (\is_array($license)) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Line exceeds 120 characters; contains 154 characters
          Open

                                  $showLicenseModal = file_exists($dir . '..' . \DIRECTORY_SEPARATOR . 'licenses' . \DIRECTORY_SEPARATOR . $returnLicense . '.txt');
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  $showLicenseModal = file_exists($dir . '..' . \DIRECTORY_SEPARATOR . 'licenses' . \DIRECTORY_SEPARATOR . $returnLicense . '.txt');
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          if (isset(static::$licenses[$libraryName])) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Line exceeds 120 characters; contains 150 characters
          Open

                              $showLicenseModal = file_exists($dir . '..' . \DIRECTORY_SEPARATOR . 'licenses' . \DIRECTORY_SEPARATOR . $returnLicense . '.txt');
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param array|string $license
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @throws \App\Exceptions\AppException
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param string $dir
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  } else {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              if ($returnLicense) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              if (isset(static::$licenses[$libraryName])) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if (file_exists(ROOT_DIRECTORY . '/composer.lock')) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  $libraries[$package['name']]['showLicenseModal'] = self::checkIfLicenseFileExists(static::$licenses[$package['name']]);
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  foreach (self::$jsonFiles as $file) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $returnLicense = '';
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $showLicenseModal = true;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  $licenseError = false;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function validateLicenseName($license)
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if (!\is_array($license)) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $license = [$license];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return $result;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if ($existJsonFiles) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  $licenseToDisplay = '';
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                      $licenseError = true;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  break;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              public static function getCredits()
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return ['static' => self::getBasicLibraries(), 'vendor' => self::getVendorLibraries(), 'public' => self::getPublicLibraries(), 'vue' => self::getVueLibs()];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $packageFile = $dir . $libraryName . \DIRECTORY_SEPARATOR . $file;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  } elseif (isset($license[0]['type'])) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  foreach ($license as $value) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  if (!empty($license['license'])) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  if (\count($license) > 1) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * Function check correct of license.
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if (stripos($value, 'and') || stripos($value, ' or ') || null === $value) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  $libraries[$package['name']]['license'] = static::$licenses[$package['name']] . ' [' . $libraries[$package['name']]['license'] . ']';
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return $libraries;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $yarnFile = \App\Json::decode(file_get_contents($integrityFile), true);
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $name = $isPrefix ? '@' : '';
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              if (\is_dir($srcDir . $name)) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @throws \App\Exceptions\AppException
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $packageFileContent = \App\Json::decode(file_get_contents($packageFile), true);
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $library['packageFileMissing'] = true;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $license = $packageFileContent['license'] ?? $packageFileContent['licenses'] ?? '';
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                      $returnLicense = $license['type'];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              $showLicenseModal = file_exists($dir . '..' . \DIRECTORY_SEPARATOR . 'licenses' . \DIRECTORY_SEPARATOR . $returnLicense . '.txt');
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $library['license'] = $license['license'];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      if (file_exists($packageFile)) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Line exceeds 120 characters; contains 154 characters
          Open

                                  $showLicenseModal = file_exists($dir . '..' . \DIRECTORY_SEPARATOR . 'licenses' . \DIRECTORY_SEPARATOR . $returnLicense . '.txt');
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param string $libraryName
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  foreach (self::$jsonFiles as $file) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                      $returnLicense = implode(', ', array_column($license, 'type'));
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          } else {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Line exceeds 120 characters; contains 153 characters
          Open

                  return ['license' => $returnLicense, 'error' => $licenseError, 'licenseToDisplay' => $licenseToDisplay, 'showLicenseModal' => $showLicenseModal];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return $library;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  if (isset($license['type'])) {
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  $licenseError = self::validateLicenseName($license);
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  $returnLicense = static::$licenses[$libraryName] . " [{$returnLicense}]";
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Line exceeds 120 characters; contains 157 characters
          Open

                                  $showLicenseModal = file_exists($dir . '..' . \DIRECTORY_SEPARATOR . 'licenses' . \DIRECTORY_SEPARATOR . $licenseToDisplay . '.txt');
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  $showLicenseModal = file_exists($dir . '..' . \DIRECTORY_SEPARATOR . 'licenses' . \DIRECTORY_SEPARATOR . $returnLicense . '.txt');
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return ['license' => $returnLicense, 'error' => $licenseError, 'licenseToDisplay' => $licenseToDisplay, 'showLicenseModal' => $showLicenseModal];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               */
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @return array
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                      $library['licenseError'] = $license['error'];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  $returnLicense = static::$licenses[$libraryName];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                          $result = true;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @param string $license
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

              /**
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  $showLicenseModal = file_exists($dir . '..' . \DIRECTORY_SEPARATOR . 'licenses' . \DIRECTORY_SEPARATOR . $licenseToDisplay . '.txt');
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                                  break;
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               * @return bool
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  }
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

                  return file_exists($filePath);
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Spaces must be used to indent lines; tabs are not allowed
          Open

               *
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          Line exceeds 120 characters; contains 164 characters
          Open

                  return ['static' => self::getBasicLibraries(), 'vendor' => self::getVendorLibraries(), 'public' => self::getPublicLibraries(), 'vue' => self::getVueLibs()];
          Severity: Minor
          Found in app/Installer/Credits.php by phpcodesniffer

          There are no issues that match your filters.

          Category
          Status