YetiForceCompany/YetiForceCRM

View on GitHub
app/Language.php

Summary

Maintainability
F
1 wk
Test Coverage
F
56%

Function getPluralized has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring.
Open

    private static function getPluralized($count)
    {
        //Extract language code from locale with special cases
        if (0 === strcasecmp(static::getLanguage(), 'pt-BR')) {
            $lang = 'pt-BR';
Severity: Minor
Found in app/Language.php - About 1 day 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

File Language.php has 526 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace App;

/**
Severity: Major
Found in app/Language.php - About 1 day to fix

    Method getPluralized has 196 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private static function getPluralized($count)
        {
            //Extract language code from locale with special cases
            if (0 === strcasecmp(static::getLanguage(), 'pt-BR')) {
                $lang = 'pt-BR';
    Severity: Major
    Found in app/Language.php - About 7 hrs to fix

      Function translate has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
      Open

          public static function translate(string $key, string $moduleName = '_Base', ?string $language = null, bool $encode = true, ?string $secondModuleName = null)
          {
              if (empty($key)) { // nothing to translate
                  return $key;
              }
      Severity: Minor
      Found in app/Language.php - About 3 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 Language has an overall complexity of 197 which is very high. The configured complexity threshold is 50.
      Open

      class Language
      {
          /**
           * Default language code.
           */
      Severity: Minor
      Found in app/Language.php by phpmd

      Function loadLanguageFile has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
      Open

          public static function loadLanguageFile($language, $moduleName = '_Base')
          {
              if (!isset(static::$languageContainer[$language][$moduleName])) {
                  if (Cache::has('LanguageFiles', $language . $moduleName)) {
                      static::$languageContainer[$language][$moduleName] = Cache::get('LanguageFiles', $language . $moduleName);
      Severity: Minor
      Found in app/Language.php - About 3 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

      Language has 25 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class Language
      {
          /**
           * Default language code.
           */
      Severity: Minor
      Found in app/Language.php - About 2 hrs to fix

        Method translate has 54 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static function translate(string $key, string $moduleName = '_Base', ?string $language = null, bool $encode = true, ?string $secondModuleName = null)
            {
                if (empty($key)) { // nothing to translate
                    return $key;
                }
        Severity: Major
        Found in app/Language.php - About 2 hrs to fix

          Function translationModify has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
          Open

              public static function translationModify(string $language, string $fileName, string $type, string $label, string $translation, bool $remove = false)
              {
                  $fileLocation = explode('__', $fileName, 2);
                  array_unshift($fileLocation, 'custom', 'languages', $language);
                  $fileDirectory = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . implode(\DIRECTORY_SEPARATOR, $fileLocation) . '.' . static::FORMAT;
          Severity: Minor
          Found in app/Language.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 translationModify has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public static function translationModify(string $language, string $fileName, string $type, string $label, string $translation, bool $remove = false)
          Severity: Minor
          Found in app/Language.php - About 45 mins to fix

            Method translate has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public static function translate(string $key, string $moduleName = '_Base', ?string $language = null, bool $encode = true, ?string $secondModuleName = null)
            Severity: Minor
            Found in app/Language.php - About 35 mins to fix

              Function getAll has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  public static function getAll(bool $active = true, bool $allData = false)
                  {
                      $cacheKey = $active ? 'Active' : 'All';
                      if (Cache::has('getAllLanguages', $cacheKey)) {
                          if (!$allData) {
              Severity: Minor
              Found in app/Language.php - About 35 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

              Function initLocale has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  public static function initLocale()
                  {
                      $original = explode(';', setlocale(LC_ALL, 0));
                      $defaultCharset = strtolower(\App\Config::main('default_charset'));
                      setlocale(
              Severity: Minor
              Found in app/Language.php - About 35 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

              Avoid too many return statements within this method.
              Open

                                  return '_1';
              Severity: Major
              Found in app/Language.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                    return '_2';
                Severity: Major
                Found in app/Language.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                      return '_1';
                  Severity: Major
                  Found in app/Language.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                        return '_0';
                    Severity: Major
                    Found in app/Language.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                          return '_0';
                      Severity: Major
                      Found in app/Language.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                    return \nl2br(static::$languageContainer[$language]['_Base']['php'][$key]);
                        Severity: Major
                        Found in app/Language.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                              return '_1';
                          Severity: Major
                          Found in app/Language.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                                return '_1';
                            Severity: Major
                            Found in app/Language.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                                  return '_0';
                              Severity: Major
                              Found in app/Language.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                                    return '_3';
                                Severity: Major
                                Found in app/Language.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                                      return '_3';
                                  Severity: Major
                                  Found in app/Language.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                                        return '_0';
                                    Severity: Major
                                    Found in app/Language.php - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                                      return '_3';
                                      Severity: Major
                                      Found in app/Language.php - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                                        return '';
                                        Severity: Major
                                        Found in app/Language.php - About 30 mins to fix

                                          Avoid too many return statements within this method.
                                          Open

                                                          return '_2';
                                          Severity: Major
                                          Found in app/Language.php - About 30 mins to fix

                                            Avoid too many return statements within this method.
                                            Open

                                                                return '_1';
                                            Severity: Major
                                            Found in app/Language.php - About 30 mins to fix

                                              Avoid too many return statements within this method.
                                              Open

                                                                  return '_1';
                                              Severity: Major
                                              Found in app/Language.php - About 30 mins to fix

                                                Avoid too many return statements within this method.
                                                Open

                                                                    return '_2';
                                                Severity: Major
                                                Found in app/Language.php - About 30 mins to fix

                                                  Avoid too many return statements within this method.
                                                  Open

                                                                      return '_0';
                                                  Severity: Major
                                                  Found in app/Language.php - About 30 mins to fix

                                                    Avoid too many return statements within this method.
                                                    Open

                                                                        return '_2';
                                                    Severity: Major
                                                    Found in app/Language.php - About 30 mins to fix

                                                      Avoid too many return statements within this method.
                                                      Open

                                                                          return '_0';
                                                      Severity: Major
                                                      Found in app/Language.php - About 30 mins to fix

                                                        Avoid too many return statements within this method.
                                                        Open

                                                                            return '_2';
                                                        Severity: Major
                                                        Found in app/Language.php - About 30 mins to fix

                                                          Avoid too many return statements within this method.
                                                          Open

                                                                              return '_4';
                                                          Severity: Major
                                                          Found in app/Language.php - About 30 mins to fix

                                                            Avoid too many return statements within this method.
                                                            Open

                                                                                return '_0';
                                                            Severity: Major
                                                            Found in app/Language.php - About 30 mins to fix

                                                              Avoid too many return statements within this method.
                                                              Open

                                                                                  return \nl2br(Purifier::encodeHtml(static::$languageContainer[$language][$base]['php'][$key]));
                                                              Severity: Major
                                                              Found in app/Language.php - About 30 mins to fix

                                                                Avoid too many return statements within this method.
                                                                Open

                                                                                return \nl2br(static::$languageContainer[$language][$base]['php'][$key]);
                                                                Severity: Major
                                                                Found in app/Language.php - About 30 mins to fix

                                                                  Avoid too many return statements within this method.
                                                                  Open

                                                                                      return '_1';
                                                                  Severity: Major
                                                                  Found in app/Language.php - About 30 mins to fix

                                                                    Avoid too many return statements within this method.
                                                                    Open

                                                                                    return '_3';
                                                                    Severity: Major
                                                                    Found in app/Language.php - About 30 mins to fix

                                                                      Avoid too many return statements within this method.
                                                                      Open

                                                                                          return '_1';
                                                                      Severity: Major
                                                                      Found in app/Language.php - About 30 mins to fix

                                                                        Avoid too many return statements within this method.
                                                                        Open

                                                                                            return '_0';
                                                                        Severity: Major
                                                                        Found in app/Language.php - About 30 mins to fix

                                                                          Avoid too many return statements within this method.
                                                                          Open

                                                                                              return '_1';
                                                                          Severity: Major
                                                                          Found in app/Language.php - About 30 mins to fix

                                                                            Avoid too many return statements within this method.
                                                                            Open

                                                                                            return '_2';
                                                                            Severity: Major
                                                                            Found in app/Language.php - About 30 mins to fix

                                                                              Avoid too many return statements within this method.
                                                                              Open

                                                                                              return '_3';
                                                                              Severity: Major
                                                                              Found in app/Language.php - About 30 mins to fix

                                                                                Avoid too many return statements within this method.
                                                                                Open

                                                                                                    return '_0';
                                                                                Severity: Major
                                                                                Found in app/Language.php - About 30 mins to fix

                                                                                  Avoid too many return statements within this method.
                                                                                  Open

                                                                                                      return '_0';
                                                                                  Severity: Major
                                                                                  Found in app/Language.php - About 30 mins to fix

                                                                                    Avoid too many return statements within this method.
                                                                                    Open

                                                                                                        return '_0';
                                                                                    Severity: Major
                                                                                    Found in app/Language.php - About 30 mins to fix

                                                                                      Avoid too many return statements within this method.
                                                                                      Open

                                                                                                          return '_0';
                                                                                      Severity: Major
                                                                                      Found in app/Language.php - About 30 mins to fix

                                                                                        Avoid too many return statements within this method.
                                                                                        Open

                                                                                                        return '_3';
                                                                                        Severity: Major
                                                                                        Found in app/Language.php - About 30 mins to fix

                                                                                          Avoid too many return statements within this method.
                                                                                          Open

                                                                                                              return '_0';
                                                                                          Severity: Major
                                                                                          Found in app/Language.php - About 30 mins to fix

                                                                                            Avoid too many return statements within this method.
                                                                                            Open

                                                                                                            return '_4';
                                                                                            Severity: Major
                                                                                            Found in app/Language.php - About 30 mins to fix

                                                                                              Avoid too many return statements within this method.
                                                                                              Open

                                                                                                          return static::translate($key, $moduleName, static::DEFAULT_LANG, $encode, $secondModuleName);
                                                                                              Severity: Major
                                                                                              Found in app/Language.php - About 30 mins to fix

                                                                                                Avoid too many return statements within this method.
                                                                                                Open

                                                                                                                    return '_1';
                                                                                                Severity: Major
                                                                                                Found in app/Language.php - About 30 mins to fix

                                                                                                  Avoid too many return statements within this method.
                                                                                                  Open

                                                                                                                  return '_2';
                                                                                                  Severity: Major
                                                                                                  Found in app/Language.php - About 30 mins to fix

                                                                                                    Avoid too many return statements within this method.
                                                                                                    Open

                                                                                                                        return '_0';
                                                                                                    Severity: Major
                                                                                                    Found in app/Language.php - About 30 mins to fix

                                                                                                      Avoid too many return statements within this method.
                                                                                                      Open

                                                                                                                          return '_1';
                                                                                                      Severity: Major
                                                                                                      Found in app/Language.php - About 30 mins to fix

                                                                                                        Avoid too many return statements within this method.
                                                                                                        Open

                                                                                                                        return \nl2br(static::$languageContainer[$language][$secondModuleName]['php'][$key]);
                                                                                                        Severity: Major
                                                                                                        Found in app/Language.php - About 30 mins to fix

                                                                                                          Avoid too many return statements within this method.
                                                                                                          Open

                                                                                                                          return \nl2br(Purifier::encodeHtml(static::$languageContainer[$language]['_Base']['php'][$key]));
                                                                                                          Severity: Major
                                                                                                          Found in app/Language.php - About 30 mins to fix

                                                                                                            Avoid too many return statements within this method.
                                                                                                            Open

                                                                                                                                return '_0';
                                                                                                            Severity: Major
                                                                                                            Found in app/Language.php - About 30 mins to fix

                                                                                                              Avoid too many return statements within this method.
                                                                                                              Open

                                                                                                                              return '_2';
                                                                                                              Severity: Major
                                                                                                              Found in app/Language.php - About 30 mins to fix

                                                                                                                Avoid too many return statements within this method.
                                                                                                                Open

                                                                                                                                return '_2';
                                                                                                                Severity: Major
                                                                                                                Found in app/Language.php - About 30 mins to fix

                                                                                                                  Avoid too many return statements within this method.
                                                                                                                  Open

                                                                                                                                      return '_1';
                                                                                                                  Severity: Major
                                                                                                                  Found in app/Language.php - About 30 mins to fix

                                                                                                                    Avoid too many return statements within this method.
                                                                                                                    Open

                                                                                                                                    return '_3';
                                                                                                                    Severity: Major
                                                                                                                    Found in app/Language.php - About 30 mins to fix

                                                                                                                      Avoid too many return statements within this method.
                                                                                                                      Open

                                                                                                                                          return '_1';
                                                                                                                      Severity: Major
                                                                                                                      Found in app/Language.php - About 30 mins to fix

                                                                                                                        Avoid too many return statements within this method.
                                                                                                                        Open

                                                                                                                                            return '_2';
                                                                                                                        Severity: Major
                                                                                                                        Found in app/Language.php - About 30 mins to fix

                                                                                                                          Avoid too many return statements within this method.
                                                                                                                          Open

                                                                                                                                              return '_2';
                                                                                                                          Severity: Major
                                                                                                                          Found in app/Language.php - About 30 mins to fix

                                                                                                                            Avoid too many return statements within this method.
                                                                                                                            Open

                                                                                                                                                return \nl2br(Purifier::encodeHtml(static::$languageContainer[$language][$secondModuleName]['php'][$key]));
                                                                                                                            Severity: Major
                                                                                                                            Found in app/Language.php - About 30 mins to fix

                                                                                                                              Avoid too many return statements within this method.
                                                                                                                              Open

                                                                                                                                      return $encode ? Purifier::encodeHtml($key) : $key;
                                                                                                                              Severity: Major
                                                                                                                              Found in app/Language.php - About 30 mins to fix

                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                Open

                                                                                                                                                return '_2';
                                                                                                                                Severity: Major
                                                                                                                                Found in app/Language.php - About 30 mins to fix

                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                  Open

                                                                                                                                                  return '_2';
                                                                                                                                  Severity: Major
                                                                                                                                  Found in app/Language.php - About 30 mins to fix

                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                    Open

                                                                                                                                                    return '_2';
                                                                                                                                    Severity: Major
                                                                                                                                    Found in app/Language.php - About 30 mins to fix

                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                      Open

                                                                                                                                                          return '_2';
                                                                                                                                      Severity: Major
                                                                                                                                      Found in app/Language.php - About 30 mins to fix

                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                        Open

                                                                                                                                                            return '_1';
                                                                                                                                        Severity: Major
                                                                                                                                        Found in app/Language.php - About 30 mins to fix

                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                          Open

                                                                                                                                                              return '_1';
                                                                                                                                          Severity: Major
                                                                                                                                          Found in app/Language.php - About 30 mins to fix

                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                            Open

                                                                                                                                                            return '_5';
                                                                                                                                            Severity: Major
                                                                                                                                            Found in app/Language.php - About 30 mins to fix

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

                                                                                                                                                  public static function translateSingleMod($key, $moduleName = '_Base', $language = false, $encode = true)
                                                                                                                                                  {
                                                                                                                                                      if (!$language) {
                                                                                                                                                          $language = static::getLanguage();
                                                                                                                                                      }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 translate() has an NPath complexity of 27648. The configured NPath complexity threshold is 200.
                                                                                                                                              Open

                                                                                                                                                  public static function translate(string $key, string $moduleName = '_Base', ?string $language = null, bool $encode = true, ?string $secondModuleName = null)
                                                                                                                                                  {
                                                                                                                                                      if (empty($key)) { // nothing to translate
                                                                                                                                                          return $key;
                                                                                                                                                      }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpmd

                                                                                                                                              NPathComplexity

                                                                                                                                              Since: 0.1

                                                                                                                                              The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

                                                                                                                                              Example

                                                                                                                                              class Foo {
                                                                                                                                                  function bar() {
                                                                                                                                                      // lots of complicated code
                                                                                                                                                  }
                                                                                                                                              }

                                                                                                                                              Source https://phpmd.org/rules/codesize.html#npathcomplexity

                                                                                                                                              The method getPluralized() has 217 lines of code. Current threshold is set to 100. Avoid really long methods.
                                                                                                                                              Open

                                                                                                                                                  private static function getPluralized($count)
                                                                                                                                                  {
                                                                                                                                                      //Extract language code from locale with special cases
                                                                                                                                                      if (0 === strcasecmp(static::getLanguage(), 'pt-BR')) {
                                                                                                                                                          $lang = 'pt-BR';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpmd

                                                                                                                                              The method getPluralized() has an NPath complexity of 9360. The configured NPath complexity threshold is 200.
                                                                                                                                              Open

                                                                                                                                                  private static function getPluralized($count)
                                                                                                                                                  {
                                                                                                                                                      //Extract language code from locale with special cases
                                                                                                                                                      if (0 === strcasecmp(static::getLanguage(), 'pt-BR')) {
                                                                                                                                                          $lang = 'pt-BR';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpmd

                                                                                                                                              NPathComplexity

                                                                                                                                              Since: 0.1

                                                                                                                                              The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

                                                                                                                                              Example

                                                                                                                                              class Foo {
                                                                                                                                                  function bar() {
                                                                                                                                                      // lots of complicated code
                                                                                                                                                  }
                                                                                                                                              }

                                                                                                                                              Source https://phpmd.org/rules/codesize.html#npathcomplexity

                                                                                                                                              The method translate() has a Cyclomatic Complexity of 20. The configured cyclomatic complexity threshold is 10.
                                                                                                                                              Open

                                                                                                                                                  public static function translate(string $key, string $moduleName = '_Base', ?string $language = null, bool $encode = true, ?string $secondModuleName = null)
                                                                                                                                                  {
                                                                                                                                                      if (empty($key)) { // nothing to translate
                                                                                                                                                          return $key;
                                                                                                                                                      }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 getPluralized() has a Cyclomatic Complexity of 103. The configured cyclomatic complexity threshold is 10.
                                                                                                                                              Open

                                                                                                                                                  private static function getPluralized($count)
                                                                                                                                                  {
                                                                                                                                                      //Extract language code from locale with special cases
                                                                                                                                                      if (0 === strcasecmp(static::getLanguage(), 'pt-BR')) {
                                                                                                                                                          $lang = 'pt-BR';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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

                                                                                                                                              Reduce the number of returns of this function 4, down to the maximum allowed 3.
                                                                                                                                              Open

                                                                                                                                                  public static function translateSingleMod($key, $moduleName = '_Base', $language = false, $encode = true)
                                                                                                                                              Severity: Major
                                                                                                                                              Found in app/Language.php by sonar-php

                                                                                                                                              Having too many return statements in a function increases the function's essential complexity because the flow of execution is broken each time a return statement is encountered. This makes it harder to read and understand the logic of the function.

                                                                                                                                              Noncompliant Code Example

                                                                                                                                              With the default threshold of 3:

                                                                                                                                              function myFunction(){ // Noncompliant as there are 4 return statements
                                                                                                                                                if (condition1) {
                                                                                                                                                  return true;
                                                                                                                                                } else {
                                                                                                                                                  if (condition2) {
                                                                                                                                                    return false;
                                                                                                                                                  } else {
                                                                                                                                                    return true;
                                                                                                                                                  }
                                                                                                                                                }
                                                                                                                                                return false;
                                                                                                                                              }
                                                                                                                                              

                                                                                                                                              Class "Language" has 25 methods, which is greater than 20 authorized. Split it into smaller classes.
                                                                                                                                              Open

                                                                                                                                              class Language
                                                                                                                                              Severity: Major
                                                                                                                                              Found in app/Language.php by sonar-php

                                                                                                                                              A class that grows too much tends to aggregate too many responsibilities and inevitably becomes harder to understand and therefore to maintain. Above a specific threshold, it is strongly advised to refactor the class into smaller ones which focus on well defined topics.

                                                                                                                                              Reduce the number of returns of this function 4, down to the maximum allowed 3.
                                                                                                                                              Open

                                                                                                                                                  public static function getAll(bool $active = true, bool $allData = false)
                                                                                                                                              Severity: Major
                                                                                                                                              Found in app/Language.php by sonar-php

                                                                                                                                              Having too many return statements in a function increases the function's essential complexity because the flow of execution is broken each time a return statement is encountered. This makes it harder to read and understand the logic of the function.

                                                                                                                                              Noncompliant Code Example

                                                                                                                                              With the default threshold of 3:

                                                                                                                                              function myFunction(){ // Noncompliant as there are 4 return statements
                                                                                                                                                if (condition1) {
                                                                                                                                                  return true;
                                                                                                                                                } else {
                                                                                                                                                  if (condition2) {
                                                                                                                                                    return false;
                                                                                                                                                  } else {
                                                                                                                                                    return true;
                                                                                                                                                  }
                                                                                                                                                }
                                                                                                                                                return false;
                                                                                                                                              }
                                                                                                                                              

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

                                                                                                                                                  public static function translate(string $key, string $moduleName = '_Base', ?string $language = null, bool $encode = true, ?string $secondModuleName = null)
                                                                                                                                              Severity: Critical
                                                                                                                                              Found in app/Language.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

                                                                                                                                              Reduce the number of returns of this function 12, down to the maximum allowed 3.
                                                                                                                                              Open

                                                                                                                                                  public static function translate(string $key, string $moduleName = '_Base', ?string $language = null, bool $encode = true, ?string $secondModuleName = null)
                                                                                                                                              Severity: Major
                                                                                                                                              Found in app/Language.php by sonar-php

                                                                                                                                              Having too many return statements in a function increases the function's essential complexity because the flow of execution is broken each time a return statement is encountered. This makes it harder to read and understand the logic of the function.

                                                                                                                                              Noncompliant Code Example

                                                                                                                                              With the default threshold of 3:

                                                                                                                                              function myFunction(){ // Noncompliant as there are 4 return statements
                                                                                                                                                if (condition1) {
                                                                                                                                                  return true;
                                                                                                                                                } else {
                                                                                                                                                  if (condition2) {
                                                                                                                                                    return false;
                                                                                                                                                  } else {
                                                                                                                                                    return true;
                                                                                                                                                  }
                                                                                                                                                }
                                                                                                                                                return false;
                                                                                                                                              }
                                                                                                                                              

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

                                                                                                                                                  public static function loadLanguageFile($language, $moduleName = '_Base')
                                                                                                                                              Severity: Critical
                                                                                                                                              Found in app/Language.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

                                                                                                                                              This function "getPluralized" has 216 lines, which is greater than the 150 lines authorized. Split it into smaller functions.
                                                                                                                                              Open

                                                                                                                                                  private static function getPluralized($count)
                                                                                                                                              Severity: Major
                                                                                                                                              Found in app/Language.php by sonar-php

                                                                                                                                              A function that grows too large tends to aggregate too many responsibilities.

                                                                                                                                              Such functions inevitably become harder to understand and therefore harder to maintain.

                                                                                                                                              Above a specific threshold, it is strongly advised to refactor into smaller functions which focus on well-defined tasks.

                                                                                                                                              Those smaller functions will not only be easier to understand, but also probably easier to test.

                                                                                                                                              Reduce the number of returns of this function 60, down to the maximum allowed 3.
                                                                                                                                              Open

                                                                                                                                                  private static function getPluralized($count)
                                                                                                                                              Severity: Major
                                                                                                                                              Found in app/Language.php by sonar-php

                                                                                                                                              Having too many return statements in a function increases the function's essential complexity because the flow of execution is broken each time a return statement is encountered. This makes it harder to read and understand the logic of the function.

                                                                                                                                              Noncompliant Code Example

                                                                                                                                              With the default threshold of 3:

                                                                                                                                              function myFunction(){ // Noncompliant as there are 4 return statements
                                                                                                                                                if (condition1) {
                                                                                                                                                  return true;
                                                                                                                                                } else {
                                                                                                                                                  if (condition2) {
                                                                                                                                                    return false;
                                                                                                                                                  } else {
                                                                                                                                                    return true;
                                                                                                                                                  }
                                                                                                                                                }
                                                                                                                                                return false;
                                                                                                                                              }
                                                                                                                                              

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

                                                                                                                                                  private static function getPluralized($count)
                                                                                                                                              Severity: Critical
                                                                                                                                              Found in app/Language.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

                                                                                                                                              The class Language has a coupling between objects value of 14. Consider to reduce the number of dependencies under 13.
                                                                                                                                              Open

                                                                                                                                              class Language
                                                                                                                                              {
                                                                                                                                                  /**
                                                                                                                                                   * Default language code.
                                                                                                                                                   */
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpmd

                                                                                                                                              CouplingBetweenObjects

                                                                                                                                              Since: 1.1.0

                                                                                                                                              A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

                                                                                                                                              Example

                                                                                                                                              class Foo {
                                                                                                                                                  /**
                                                                                                                                                   * @var \foo\bar\X
                                                                                                                                                   */
                                                                                                                                                  private $x = null;
                                                                                                                                              
                                                                                                                                                  /**
                                                                                                                                                   * @var \foo\bar\Y
                                                                                                                                                   */
                                                                                                                                                  private $y = null;
                                                                                                                                              
                                                                                                                                                  /**
                                                                                                                                                   * @var \foo\bar\Z
                                                                                                                                                   */
                                                                                                                                                  private $z = null;
                                                                                                                                              
                                                                                                                                                  public function setFoo(\Foo $foo) {}
                                                                                                                                                  public function setBar(\Bar $bar) {}
                                                                                                                                                  public function setBaz(\Baz $baz) {}
                                                                                                                                              
                                                                                                                                                  /**
                                                                                                                                                   * @return \SplObjectStorage
                                                                                                                                                   * @throws \OutOfRangeException
                                                                                                                                                   * @throws \InvalidArgumentException
                                                                                                                                                   * @throws \ErrorException
                                                                                                                                                   */
                                                                                                                                                  public function process(\Iterator $it) {}
                                                                                                                                              
                                                                                                                                                  // ...
                                                                                                                                              }

                                                                                                                                              Source https://phpmd.org/rules/design.html#couplingbetweenobjects

                                                                                                                                              The method translateEncodeHtml has a boolean flag argument $currentLanguage, which is a certain sign of a Single Responsibility Principle violation.
                                                                                                                                              Open

                                                                                                                                                  public static function translateEncodeHtml($key, $moduleName = '_Base', $currentLanguage = false)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpmd

                                                                                                                                              BooleanArgumentFlag

                                                                                                                                              Since: 1.4.0

                                                                                                                                              A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

                                                                                                                                              Example

                                                                                                                                              class Foo {
                                                                                                                                                  public function bar($flag = true) {
                                                                                                                                                  }
                                                                                                                                              }

                                                                                                                                              Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

                                                                                                                                              The method getAll has a boolean flag argument $allData, which is a certain sign of a Single Responsibility Principle violation.
                                                                                                                                              Open

                                                                                                                                                  public static function getAll(bool $active = true, bool $allData = false)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpmd

                                                                                                                                              BooleanArgumentFlag

                                                                                                                                              Since: 1.4.0

                                                                                                                                              A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

                                                                                                                                              Example

                                                                                                                                              class Foo {
                                                                                                                                                  public function bar($flag = true) {
                                                                                                                                                  }
                                                                                                                                              }

                                                                                                                                              Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

                                                                                                                                              The method translationModify has a boolean flag argument $remove, which is a certain sign of a Single Responsibility Principle violation.
                                                                                                                                              Open

                                                                                                                                                  public static function translationModify(string $language, string $fileName, string $type, string $label, string $translation, bool $remove = false)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpmd

                                                                                                                                              BooleanArgumentFlag

                                                                                                                                              Since: 1.4.0

                                                                                                                                              A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

                                                                                                                                              Example

                                                                                                                                              class Foo {
                                                                                                                                                  public function bar($flag = true) {
                                                                                                                                                  }
                                                                                                                                              }

                                                                                                                                              Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

                                                                                                                                              The method translate has a boolean flag argument $encode, which is a certain sign of a Single Responsibility Principle violation.
                                                                                                                                              Open

                                                                                                                                                  public static function translate(string $key, string $moduleName = '_Base', ?string $language = null, bool $encode = true, ?string $secondModuleName = null)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpmd

                                                                                                                                              BooleanArgumentFlag

                                                                                                                                              Since: 1.4.0

                                                                                                                                              A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

                                                                                                                                              Example

                                                                                                                                              class Foo {
                                                                                                                                                  public function bar($flag = true) {
                                                                                                                                                  }
                                                                                                                                              }

                                                                                                                                              Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

                                                                                                                                              The method getAll has a boolean flag argument $active, which is a certain sign of a Single Responsibility Principle violation.
                                                                                                                                              Open

                                                                                                                                                  public static function getAll(bool $active = true, bool $allData = false)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpmd

                                                                                                                                              BooleanArgumentFlag

                                                                                                                                              Since: 1.4.0

                                                                                                                                              A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

                                                                                                                                              Example

                                                                                                                                              class Foo {
                                                                                                                                                  public function bar($flag = true) {
                                                                                                                                                  }
                                                                                                                                              }

                                                                                                                                              Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

                                                                                                                                              The method translateSingleMod has a boolean flag argument $language, which is a certain sign of a Single Responsibility Principle violation.
                                                                                                                                              Open

                                                                                                                                                  public static function translateSingleMod($key, $moduleName = '_Base', $language = false, $encode = true)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpmd

                                                                                                                                              BooleanArgumentFlag

                                                                                                                                              Since: 1.4.0

                                                                                                                                              A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

                                                                                                                                              Example

                                                                                                                                              class Foo {
                                                                                                                                                  public function bar($flag = true) {
                                                                                                                                                  }
                                                                                                                                              }

                                                                                                                                              Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

                                                                                                                                              The method translateSingleMod has a boolean flag argument $encode, which is a certain sign of a Single Responsibility Principle violation.
                                                                                                                                              Open

                                                                                                                                                  public static function translateSingleMod($key, $moduleName = '_Base', $language = false, $encode = true)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpmd

                                                                                                                                              BooleanArgumentFlag

                                                                                                                                              Since: 1.4.0

                                                                                                                                              A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

                                                                                                                                              Example

                                                                                                                                              class Foo {
                                                                                                                                                  public function bar($flag = true) {
                                                                                                                                                  }
                                                                                                                                              }

                                                                                                                                              Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

                                                                                                                                              Avoid using static access to class 'App\Purifier' in method 'translateSingleMod'.
                                                                                                                                              Open

                                                                                                                                                              return Purifier::encodeHtml(static::$languageContainer[$language][$moduleName]['php'][$key]);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Purifier' in method 'translateSingleMod'.
                                                                                                                                              Open

                                                                                                                                                      return $encode ? Purifier::encodeHtml($key) : $key;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Cache' in method 'getAll'.
                                                                                                                                              Open

                                                                                                                                                      return Cache::get('getAllLanguages', $cacheKey);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 'translationModify'.
                                                                                                                                              Open

                                                                                                                                                      if (false === Json::save($fileDirectory, $translations)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Purifier' in method 'translate'.
                                                                                                                                              Open

                                                                                                                                                                  return \nl2br(Purifier::encodeHtml(static::$languageContainer[$language][$base]['php'][$key]));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Config' in method 'translate'.
                                                                                                                                              Open

                                                                                                                                                      if (\App\Config::performance('recursiveTranslate') && static::DEFAULT_LANG !== $language) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Cache' in method 'getAll'.
                                                                                                                                              Open

                                                                                                                                                      if (Cache::has('getAllLanguages', $cacheKey)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Cache' in method 'getAll'.
                                                                                                                                              Open

                                                                                                                                                          return Cache::get('getAllLanguages', $cacheKey);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Purifier' in method 'translateEncodeHtml'.
                                                                                                                                              Open

                                                                                                                                                      return \App\Purifier::encodeHtml(static::translate($key, $moduleName, $currentLanguage));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 loadLanguageFile uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                                                                                              Open

                                                                                                                                                          } else {
                                                                                                                                                              static::$languageContainer[$language][$moduleName] = [];
                                                                                                                                                              $file = \DIRECTORY_SEPARATOR . 'languages' . \DIRECTORY_SEPARATOR . $language . \DIRECTORY_SEPARATOR . $moduleName . '.' . static::FORMAT;
                                                                                                                                                              $langFile = ROOT_DIRECTORY . $file;
                                                                                                                                                              if (file_exists($langFile)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Cache' in method 'getAll'.
                                                                                                                                              Open

                                                                                                                                                          Cache::save('getLangInfo', $row['prefix'], $row);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 '\Locale' in method 'initLocale'.
                                                                                                                                              Open

                                                                                                                                                          \Locale::acceptFromHttp(\App\Config::main('default_language')) . '.' . $defaultCharset,
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Session' in method 'getLanguage'.
                                                                                                                                              Open

                                                                                                                                                          $language = \App\Session::get('language');
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 assigning values to variables in if clauses and the like (line '235', column '9').
                                                                                                                                              Open

                                                                                                                                                  public static function getTranslateHelpInfo(\Vtiger_Field_Model $fieldModel, string $view): string
                                                                                                                                                  {
                                                                                                                                                      $translate = '';
                                                                                                                                                      if (\in_array($view, explode(',', $fieldModel->get('helpinfo')))) {
                                                                                                                                                          $label = $fieldModel->getFieldLabel();
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpmd

                                                                                                                                              IfStatementAssignment

                                                                                                                                              Since: 2.7.0

                                                                                                                                              Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                                                                                                                                              Example

                                                                                                                                              class Foo
                                                                                                                                              {
                                                                                                                                                  public function bar($flag)
                                                                                                                                                  {
                                                                                                                                                      if ($foo = 'bar') { // possible typo
                                                                                                                                                          // ...
                                                                                                                                                      }
                                                                                                                                                      if ($baz = 0) { // always false
                                                                                                                                                          // ...
                                                                                                                                                      }
                                                                                                                                                  }
                                                                                                                                              }

                                                                                                                                              Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

                                                                                                                                              Avoid using static access to class 'App\Cache' in method 'getAll'.
                                                                                                                                              Open

                                                                                                                                                              return array_column(Cache::get('getAllLanguages', $cacheKey), 'name', 'prefix');
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 'loadLanguageFile'.
                                                                                                                                              Open

                                                                                                                                                                  static::$languageContainer[$language][$moduleName] = Json::decode(file_get_contents($langFile), true) ?? [];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Cache' in method 'getAll'.
                                                                                                                                              Open

                                                                                                                                                      Cache::save('getAllLanguages', 'All', $all);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Cache' in method 'getLangInfo'.
                                                                                                                                              Open

                                                                                                                                                          return Cache::get('getLangInfo', $prefix);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Config' in method 'initLocale'.
                                                                                                                                              Open

                                                                                                                                                      $defaultCharset = strtolower(\App\Config::main('default_charset'));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Config' in method 'initLocale'.
                                                                                                                                              Open

                                                                                                                                                          \Locale::acceptFromHttp(\App\Config::main('default_language')) . '.' . $defaultCharset,
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 '\Locale' in method 'initLocale'.
                                                                                                                                              Open

                                                                                                                                                          \Locale::acceptFromHttp(self::DEFAULT_LANG) . ".$defaultCharset",
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 getPluralized uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                                                                                              Open

                                                                                                                                                      } else {
                                                                                                                                                          $lang = static::getShortLanguageName();
                                                                                                                                                      }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 '\Locale' in method 'getLanguageRegion'.
                                                                                                                                              Open

                                                                                                                                              }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Log' in method 'translate'.
                                                                                                                                              Open

                                                                                                                                                          Log::warning('Invalid module name - module: ' . var_export($moduleName, true));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Cache' in method 'getAll'.
                                                                                                                                              Open

                                                                                                                                                          return array_column(Cache::get('getAllLanguages', $cacheKey), 'name', 'prefix');
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Cache' in method 'getLangInfo'.
                                                                                                                                              Open

                                                                                                                                                      if (Cache::has('getLangInfo', $prefix)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Cache' in method 'getLangInfo'.
                                                                                                                                              Open

                                                                                                                                                      return Cache::save('getLangInfo', $prefix, (new Db\Query())->from('vtiger_language')->where(['prefix' => $prefix])->one());
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 translationModify uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                                                                                              Open

                                                                                                                                                      } else {
                                                                                                                                                          $loc = '';
                                                                                                                                                          array_pop($fileLocation);
                                                                                                                                                          foreach ($fileLocation as $name) {
                                                                                                                                                              $loc .= \DIRECTORY_SEPARATOR . $name;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 '\Locale' in method 'initLocale'.
                                                                                                                                              Open

                                                                                                                                                          \Locale::acceptFromHttp(self::getLanguage()) . '.' . $defaultCharset,
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Utils' in method 'getDisplayName'.
                                                                                                                                              Open

                                                                                                                                                      return Utils::mbUcfirst(locale_get_region($prefix) === strtoupper(locale_get_primary_language($prefix)) ? locale_get_display_language($prefix, $prefix) : locale_get_display_name($prefix, $prefix));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 getLanguage uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                                                                                              Open

                                                                                                                                                      } else {
                                                                                                                                                          $language = User::getCurrentUserModel()->getDetail('language');
                                                                                                                                                      }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Config' in method 'translateSingleMod'.
                                                                                                                                              Open

                                                                                                                                                      if (\App\Config::performance('recursiveTranslate') && static::DEFAULT_LANG !== $language) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 '\Locale' in method 'getShortLanguageName'.
                                                                                                                                              Open

                                                                                                                                                      return static::$shortLanguage = (empty($match[0])) ? \Locale::getPrimaryLanguage(self::DEFAULT_LANG) : $match[0];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 'loadLanguageFile'.
                                                                                                                                              Open

                                                                                                                                                                  $translation = Json::decode(file_get_contents($langCustomFile), true) ?? [];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Module' in method 'translate'.
                                                                                                                                              Open

                                                                                                                                                          $moduleName = Module::getModuleName($moduleName);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 translate uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                                                                                              Open

                                                                                                                                                      } else {
                                                                                                                                                          $moduleName = str_replace([':', '.'], [\DIRECTORY_SEPARATOR, \DIRECTORY_SEPARATOR], $moduleName);
                                                                                                                                                      }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Purifier' in method 'translate'.
                                                                                                                                              Open

                                                                                                                                                      return $encode ? Purifier::encodeHtml($key) : $key;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Log' in method 'loadLanguageFile'.
                                                                                                                                              Open

                                                                                                                                                                  \App\Log::info("Language file does not exist, module: $moduleName ,language: $language");
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 '\Locale' in method 'initLocale'.
                                                                                                                                              Open

                                                                                                                                                          \Locale::acceptFromHttp(self::DEFAULT_LANG) . '.utf8'
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Cache' in method 'loadLanguageFile'.
                                                                                                                                              Open

                                                                                                                                                              static::$languageContainer[$language][$moduleName] = Cache::get('LanguageFiles', $language . $moduleName);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 initLocale uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                                                                                              Open

                                                                                                                                                          } else {
                                                                                                                                                              $category = 'LC_ALL';
                                                                                                                                                              $locale = $localeSetting;
                                                                                                                                                          }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Config' in method 'getLanguage'.
                                                                                                                                              Open

                                                                                                                                                      return static::$language = empty($language) ? \App\Config::main('default_language') : $language;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Purifier' in method 'translate'.
                                                                                                                                              Open

                                                                                                                                                                  return \nl2br(Purifier::encodeHtml(static::$languageContainer[$language][$secondModuleName]['php'][$key]));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Cache' in method 'loadLanguageFile'.
                                                                                                                                              Open

                                                                                                                                                          if (Cache::has('LanguageFiles', $language . $moduleName)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 'translationModify'.
                                                                                                                                              Open

                                                                                                                                                          $translations = Json::decode(file_get_contents($fileDirectory), true);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Cache' in method 'translationModify'.
                                                                                                                                              Open

                                                                                                                                                      Cache::delete('LanguageFiles', $language . str_replace('__', \DIRECTORY_SEPARATOR, $fileName));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Session' in method 'getLanguage'.
                                                                                                                                              Open

                                                                                                                                                      if (!empty(\App\Session::get('language'))) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Purifier' in method 'translate'.
                                                                                                                                              Open

                                                                                                                                                              return \nl2br(Purifier::encodeHtml(static::$languageContainer[$language]['_Base']['php'][$key]));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Log' in method 'translate'.
                                                                                                                                              Open

                                                                                                                                                      \App\Log::info("Cannot translate this: '$key' for module '$moduleName', lang: $language");
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Cache' in method 'loadLanguageFile'.
                                                                                                                                              Open

                                                                                                                                                              Cache::save('LanguageFiles', $language . $moduleName, static::$languageContainer[$language][$moduleName], Cache::LONG);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Cache' in method 'getAll'.
                                                                                                                                              Open

                                                                                                                                                      Cache::save('getAllLanguages', 'Active', $actives);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 assigning values to variables in if clauses and the like (line '237', column '15').
                                                                                                                                              Open

                                                                                                                                                  public static function getTranslateHelpInfo(\Vtiger_Field_Model $fieldModel, string $view): string
                                                                                                                                                  {
                                                                                                                                                      $translate = '';
                                                                                                                                                      if (\in_array($view, explode(',', $fieldModel->get('helpinfo')))) {
                                                                                                                                                          $label = $fieldModel->getFieldLabel();
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpmd

                                                                                                                                              IfStatementAssignment

                                                                                                                                              Since: 2.7.0

                                                                                                                                              Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

                                                                                                                                              Example

                                                                                                                                              class Foo
                                                                                                                                              {
                                                                                                                                                  public function bar($flag)
                                                                                                                                                  {
                                                                                                                                                      if ($foo = 'bar') { // possible typo
                                                                                                                                                          // ...
                                                                                                                                                      }
                                                                                                                                                      if ($baz = 0) { // always false
                                                                                                                                                          // ...
                                                                                                                                                      }
                                                                                                                                                  }
                                                                                                                                              }

                                                                                                                                              Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

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

                                                                                                                                                      } else {
                                                                                                                                                          $postfix = static::getPluralized((int) $count);
                                                                                                                                                      }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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\Purifier' in method 'translate'.
                                                                                                                                              Open

                                                                                                                                                              return \nl2br(Purifier::encodeHtml(static::$languageContainer[$language][$moduleName]['php'][$key]));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.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 "getAllLanguages" 7 times.
                                                                                                                                              Open

                                                                                                                                                      if (Cache::has('getAllLanguages', $cacheKey)) {
                                                                                                                                              Severity: Critical
                                                                                                                                              Found in app/Language.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 "language" 3 times.
                                                                                                                                              Open

                                                                                                                                                      if (!empty(\App\Session::get('language'))) {
                                                                                                                                              Severity: Critical
                                                                                                                                              Found in app/Language.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 "Settings" 4 times.
                                                                                                                                              Open

                                                                                                                                                      if (0 === strpos($moduleName, 'Settings')) {
                                                                                                                                              Severity: Critical
                                                                                                                                              Found in app/Language.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 "_Base" 12 times.
                                                                                                                                              Open

                                                                                                                                                  public static function translate(string $key, string $moduleName = '_Base', ?string $language = null, bool $encode = true, ?string $secondModuleName = null)
                                                                                                                                              Severity: Critical
                                                                                                                                              Found in app/Language.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 "LanguageFiles" 4 times.
                                                                                                                                              Open

                                                                                                                                                          if (Cache::has('LanguageFiles', $language . $moduleName)) {
                                                                                                                                              Severity: Critical
                                                                                                                                              Found in app/Language.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 "getLangInfo" 4 times.
                                                                                                                                              Open

                                                                                                                                                          Cache::save('getLangInfo', $row['prefix'], $row);
                                                                                                                                              Severity: Critical
                                                                                                                                              Found in app/Language.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 "prefix" 6 times.
                                                                                                                                              Open

                                                                                                                                                              return array_column(Cache::get('getAllLanguages', $cacheKey), 'name', 'prefix');
                                                                                                                                              Severity: Critical
                                                                                                                                              Found in app/Language.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 "pt-BR" 3 times.
                                                                                                                                              Open

                                                                                                                                                      if (0 === strcasecmp(static::getLanguage(), 'pt-BR')) {
                                                                                                                                              Severity: Critical
                                                                                                                                              Found in app/Language.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.

                                                                                                                                              Call to method warning from undeclared class \App\Log
                                                                                                                                              Open

                                                                                                                                                          Log::warning('Invalid module name - module: ' . var_export($moduleName, true));
                                                                                                                                              Severity: Critical
                                                                                                                                              Found in app/Language.php by phan

                                                                                                                                              Call to deprecated function \Vtiger_Field_Model::getFieldLabel() defined at /code/modules/Vtiger/models/Field.php:215
                                                                                                                                              Open

                                                                                                                                                          $label = $fieldModel->getFieldLabel();
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phan

                                                                                                                                              Argument 3 (language) is false but \App\Language::translate() takes null|string defined at /code/app/Language.php:161
                                                                                                                                              Open

                                                                                                                                                      return \App\Purifier::encodeHtml(static::translate($key, $moduleName, $currentLanguage));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phan

                                                                                                                                              Doc-block of $secondModuleName in translate is phpdoc param type string which is not a permitted replacement of the nullable param type ?string declared in the signature ('?T' should be documented as 'T|null' or '?T')
                                                                                                                                              Open

                                                                                                                                                   * @param string      $secondModuleName - Additional module name to be translated when not in $moduleName
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phan

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

                                                                                                                                                                  $translation = Json::decode(file_get_contents($langCustomFile), true) ?? [];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phan

                                                                                                                                              Argument 1 (tabId) is string but \App\Module::getModuleName() takes int defined at /code/app/Module.php:129
                                                                                                                                              Open

                                                                                                                                                          $moduleName = Module::getModuleName($moduleName);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phan

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

                                                                                                                                                                  static::$languageContainer[$language][$moduleName] = Json::decode(file_get_contents($langFile), true) ?? [];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phan

                                                                                                                                              Call to method info from undeclared class \App\Log
                                                                                                                                              Open

                                                                                                                                                                  \App\Log::info("Language file does not exist, module: $moduleName ,language: $language");
                                                                                                                                              Severity: Critical
                                                                                                                                              Found in app/Language.php by phan

                                                                                                                                              Method \App\Language::clearTemporaryLanguage is declared to return string but has no return value
                                                                                                                                              Open

                                                                                                                                                  public static function clearTemporaryLanguage()
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phan

                                                                                                                                              Assigning false to property but \App\Language::$temporaryLanguage is string
                                                                                                                                              Open

                                                                                                                                                      static::$temporaryLanguage = false;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phan

                                                                                                                                              Call to undeclared method \App\Db\Query::from
                                                                                                                                              Open

                                                                                                                                                      return Cache::save('getLangInfo', $prefix, (new Db\Query())->from('vtiger_language')->where(['prefix' => $prefix])->one());
                                                                                                                                              Severity: Critical
                                                                                                                                              Found in app/Language.php by phan

                                                                                                                                              Argument 2 (locale) is 0 but \setlocale() takes ?array
                                                                                                                                              Open

                                                                                                                                                      $original = explode(';', setlocale(LC_ALL, 0));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phan

                                                                                                                                              Call to method getCurrentUserModel from undeclared class \App\User (Did you mean class \Tests\App\User)
                                                                                                                                              Open

                                                                                                                                                          $language = User::getCurrentUserModel()->getDetail('language');
                                                                                                                                              Severity: Critical
                                                                                                                                              Found in app/Language.php by phan

                                                                                                                                              Call to method info from undeclared class \App\Log
                                                                                                                                              Open

                                                                                                                                                      \App\Log::info("Cannot translate this: '$key' for module '$moduleName', lang: $language");
                                                                                                                                              Severity: Critical
                                                                                                                                              Found in app/Language.php by phan

                                                                                                                                              Call to undeclared method \App\Db\Query::from
                                                                                                                                              Open

                                                                                                                                                      $dataReader = (new Db\Query())->from('vtiger_language')->createCommand()->query();
                                                                                                                                              Severity: Critical
                                                                                                                                              Found in app/Language.php by phan

                                                                                                                                              Returning type bool but getLangInfo() is declared to return array
                                                                                                                                              Open

                                                                                                                                                      return Cache::save('getLangInfo', $prefix, (new Db\Query())->from('vtiger_language')->where(['prefix' => $prefix])->one());
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phan

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

                                                                                                                                                          $translations = Json::decode(file_get_contents($fileDirectory), true);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phan

                                                                                                                                              This case's code block is the same as the block for the case on line 478.
                                                                                                                                              Open

                                                                                                                                                          case 'me':
                                                                                                                                                              $i = $count % 10;
                                                                                                                                                              $j = $count % 100;
                                                                                                                                                              if (1 === $i && 11 !== $j) {
                                                                                                                                                                  return '_0';
                                                                                                                                              Severity: Major
                                                                                                                                              Found in app/Language.php by sonar-php

                                                                                                                                              Having two cases in a switch statement or two branches in an if chain with the same implementation is at best duplicate code, and at worst a coding error. If the same logic is truly needed for both instances, then in an if chain they should be combined, or for a switch, one should fall through to the other.

                                                                                                                                              Noncompliant Code Example

                                                                                                                                              switch ($i) {
                                                                                                                                                case 1:
                                                                                                                                                  doSomething();
                                                                                                                                                  break;
                                                                                                                                                case 2:
                                                                                                                                                  doSomethingDifferent();
                                                                                                                                                  break;
                                                                                                                                                case 3:  // Noncompliant; duplicates case 1's implementation
                                                                                                                                                  doSomething();
                                                                                                                                                  break;
                                                                                                                                                default:
                                                                                                                                                  doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              if ($a >= 0 && $a < 10) {
                                                                                                                                                doTheThing();
                                                                                                                                              else if ($a >= 10 && $a < 20) {
                                                                                                                                                doTheOtherThing();
                                                                                                                                              }
                                                                                                                                              else if ($a >= 20 && $a < 50) {
                                                                                                                                                doTheThing();  // Noncompliant; duplicates first condition
                                                                                                                                              }
                                                                                                                                              else {
                                                                                                                                                doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              if ($b == 0) {
                                                                                                                                                doOneMoreThing();
                                                                                                                                              }
                                                                                                                                              else {
                                                                                                                                                doOneMoreThing(); // Noncompliant; duplicates then-branch
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              var b = a ? 12 > 4 : 4;  // Noncompliant; always results in the same value
                                                                                                                                              

                                                                                                                                              Compliant Solution

                                                                                                                                              switch ($i) {
                                                                                                                                                case 1:
                                                                                                                                                case 3:
                                                                                                                                                  doSomething();
                                                                                                                                                  break;
                                                                                                                                                case 2:
                                                                                                                                                  doSomethingDifferent();
                                                                                                                                                  break;
                                                                                                                                                default:
                                                                                                                                                  doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              if (($a >= 0 && $a < 10) || ($a >= 20 && $a < 50)) {
                                                                                                                                                doTheThing();
                                                                                                                                              else if ($a >= 10 && $a < 20) {
                                                                                                                                                doTheOtherThing();
                                                                                                                                              }
                                                                                                                                              else {
                                                                                                                                                doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              doOneMoreThing();
                                                                                                                                              
                                                                                                                                              b = 4;
                                                                                                                                              

                                                                                                                                              or

                                                                                                                                              switch ($i) {
                                                                                                                                                case 1:
                                                                                                                                                  doSomething();
                                                                                                                                                  break;
                                                                                                                                                case 2:
                                                                                                                                                  doSomethingDifferent();
                                                                                                                                                  break;
                                                                                                                                                case 3:
                                                                                                                                                  doThirdThing();
                                                                                                                                                  break;
                                                                                                                                                default:
                                                                                                                                                  doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              if ($a >= 0 && $a < 10) {
                                                                                                                                                doTheThing();
                                                                                                                                              else if ($a >= 10 && $a < 20) {
                                                                                                                                                doTheOtherThing();
                                                                                                                                              }
                                                                                                                                              else if ($a >= 20 && $a < 50) {
                                                                                                                                                doTheThirdThing();
                                                                                                                                              }
                                                                                                                                              else {
                                                                                                                                                doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              if ($b == 0) {
                                                                                                                                                doOneMoreThing();
                                                                                                                                              }
                                                                                                                                              else {
                                                                                                                                                doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              int b = a ? 12 > 4 : 8;
                                                                                                                                              

                                                                                                                                              Exceptions

                                                                                                                                              Blocks in an if chain that contain a single line of code are ignored, as are blocks in a switch statement that contain a single line of code with or without a following break.

                                                                                                                                              This case's code block is the same as the block for the case on line 499.
                                                                                                                                              Open

                                                                                                                                                          case 'pl':
                                                                                                                                                              $i = $count % 10;
                                                                                                                                                              $j = $count % 100;
                                                                                                                                                              if (1 === $count) {
                                                                                                                                                                  return '_0';
                                                                                                                                              Severity: Major
                                                                                                                                              Found in app/Language.php by sonar-php

                                                                                                                                              Having two cases in a switch statement or two branches in an if chain with the same implementation is at best duplicate code, and at worst a coding error. If the same logic is truly needed for both instances, then in an if chain they should be combined, or for a switch, one should fall through to the other.

                                                                                                                                              Noncompliant Code Example

                                                                                                                                              switch ($i) {
                                                                                                                                                case 1:
                                                                                                                                                  doSomething();
                                                                                                                                                  break;
                                                                                                                                                case 2:
                                                                                                                                                  doSomethingDifferent();
                                                                                                                                                  break;
                                                                                                                                                case 3:  // Noncompliant; duplicates case 1's implementation
                                                                                                                                                  doSomething();
                                                                                                                                                  break;
                                                                                                                                                default:
                                                                                                                                                  doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              if ($a >= 0 && $a < 10) {
                                                                                                                                                doTheThing();
                                                                                                                                              else if ($a >= 10 && $a < 20) {
                                                                                                                                                doTheOtherThing();
                                                                                                                                              }
                                                                                                                                              else if ($a >= 20 && $a < 50) {
                                                                                                                                                doTheThing();  // Noncompliant; duplicates first condition
                                                                                                                                              }
                                                                                                                                              else {
                                                                                                                                                doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              if ($b == 0) {
                                                                                                                                                doOneMoreThing();
                                                                                                                                              }
                                                                                                                                              else {
                                                                                                                                                doOneMoreThing(); // Noncompliant; duplicates then-branch
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              var b = a ? 12 > 4 : 4;  // Noncompliant; always results in the same value
                                                                                                                                              

                                                                                                                                              Compliant Solution

                                                                                                                                              switch ($i) {
                                                                                                                                                case 1:
                                                                                                                                                case 3:
                                                                                                                                                  doSomething();
                                                                                                                                                  break;
                                                                                                                                                case 2:
                                                                                                                                                  doSomethingDifferent();
                                                                                                                                                  break;
                                                                                                                                                default:
                                                                                                                                                  doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              if (($a >= 0 && $a < 10) || ($a >= 20 && $a < 50)) {
                                                                                                                                                doTheThing();
                                                                                                                                              else if ($a >= 10 && $a < 20) {
                                                                                                                                                doTheOtherThing();
                                                                                                                                              }
                                                                                                                                              else {
                                                                                                                                                doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              doOneMoreThing();
                                                                                                                                              
                                                                                                                                              b = 4;
                                                                                                                                              

                                                                                                                                              or

                                                                                                                                              switch ($i) {
                                                                                                                                                case 1:
                                                                                                                                                  doSomething();
                                                                                                                                                  break;
                                                                                                                                                case 2:
                                                                                                                                                  doSomethingDifferent();
                                                                                                                                                  break;
                                                                                                                                                case 3:
                                                                                                                                                  doThirdThing();
                                                                                                                                                  break;
                                                                                                                                                default:
                                                                                                                                                  doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              if ($a >= 0 && $a < 10) {
                                                                                                                                                doTheThing();
                                                                                                                                              else if ($a >= 10 && $a < 20) {
                                                                                                                                                doTheOtherThing();
                                                                                                                                              }
                                                                                                                                              else if ($a >= 20 && $a < 50) {
                                                                                                                                                doTheThirdThing();
                                                                                                                                              }
                                                                                                                                              else {
                                                                                                                                                doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              if ($b == 0) {
                                                                                                                                                doOneMoreThing();
                                                                                                                                              }
                                                                                                                                              else {
                                                                                                                                                doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              int b = a ? 12 > 4 : 8;
                                                                                                                                              

                                                                                                                                              Exceptions

                                                                                                                                              Blocks in an if chain that contain a single line of code are ignored, as are blocks in a switch statement that contain a single line of code with or without a following break.

                                                                                                                                              This branch's code block is the same as the block for the branch on line 235.
                                                                                                                                              Open

                                                                                                                                                          } elseif (($translated = self::translateSingleMod($label, 'Other:HelpInfo')) !== $label) {
                                                                                                                                                              $translate = $translated;
                                                                                                                                                          }
                                                                                                                                              Severity: Major
                                                                                                                                              Found in app/Language.php by sonar-php

                                                                                                                                              Having two cases in a switch statement or two branches in an if chain with the same implementation is at best duplicate code, and at worst a coding error. If the same logic is truly needed for both instances, then in an if chain they should be combined, or for a switch, one should fall through to the other.

                                                                                                                                              Noncompliant Code Example

                                                                                                                                              switch ($i) {
                                                                                                                                                case 1:
                                                                                                                                                  doSomething();
                                                                                                                                                  break;
                                                                                                                                                case 2:
                                                                                                                                                  doSomethingDifferent();
                                                                                                                                                  break;
                                                                                                                                                case 3:  // Noncompliant; duplicates case 1's implementation
                                                                                                                                                  doSomething();
                                                                                                                                                  break;
                                                                                                                                                default:
                                                                                                                                                  doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              if ($a >= 0 && $a < 10) {
                                                                                                                                                doTheThing();
                                                                                                                                              else if ($a >= 10 && $a < 20) {
                                                                                                                                                doTheOtherThing();
                                                                                                                                              }
                                                                                                                                              else if ($a >= 20 && $a < 50) {
                                                                                                                                                doTheThing();  // Noncompliant; duplicates first condition
                                                                                                                                              }
                                                                                                                                              else {
                                                                                                                                                doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              if ($b == 0) {
                                                                                                                                                doOneMoreThing();
                                                                                                                                              }
                                                                                                                                              else {
                                                                                                                                                doOneMoreThing(); // Noncompliant; duplicates then-branch
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              var b = a ? 12 > 4 : 4;  // Noncompliant; always results in the same value
                                                                                                                                              

                                                                                                                                              Compliant Solution

                                                                                                                                              switch ($i) {
                                                                                                                                                case 1:
                                                                                                                                                case 3:
                                                                                                                                                  doSomething();
                                                                                                                                                  break;
                                                                                                                                                case 2:
                                                                                                                                                  doSomethingDifferent();
                                                                                                                                                  break;
                                                                                                                                                default:
                                                                                                                                                  doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              if (($a >= 0 && $a < 10) || ($a >= 20 && $a < 50)) {
                                                                                                                                                doTheThing();
                                                                                                                                              else if ($a >= 10 && $a < 20) {
                                                                                                                                                doTheOtherThing();
                                                                                                                                              }
                                                                                                                                              else {
                                                                                                                                                doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              doOneMoreThing();
                                                                                                                                              
                                                                                                                                              b = 4;
                                                                                                                                              

                                                                                                                                              or

                                                                                                                                              switch ($i) {
                                                                                                                                                case 1:
                                                                                                                                                  doSomething();
                                                                                                                                                  break;
                                                                                                                                                case 2:
                                                                                                                                                  doSomethingDifferent();
                                                                                                                                                  break;
                                                                                                                                                case 3:
                                                                                                                                                  doThirdThing();
                                                                                                                                                  break;
                                                                                                                                                default:
                                                                                                                                                  doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              if ($a >= 0 && $a < 10) {
                                                                                                                                                doTheThing();
                                                                                                                                              else if ($a >= 10 && $a < 20) {
                                                                                                                                                doTheOtherThing();
                                                                                                                                              }
                                                                                                                                              else if ($a >= 20 && $a < 50) {
                                                                                                                                                doTheThirdThing();
                                                                                                                                              }
                                                                                                                                              else {
                                                                                                                                                doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              if ($b == 0) {
                                                                                                                                                doOneMoreThing();
                                                                                                                                              }
                                                                                                                                              else {
                                                                                                                                                doTheRest();
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              int b = a ? 12 > 4 : 8;
                                                                                                                                              

                                                                                                                                              Exceptions

                                                                                                                                              Blocks in an if chain that contain a single line of code are ignored, as are blocks in a switch statement that contain a single line of code with or without a following break.

                                                                                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                          if (isset(static::$languageContainer[$language][$base]['php'][$key])) {
                                                                                                                                                              if ($encode) {
                                                                                                                                                                  return \nl2br(Purifier::encodeHtml(static::$languageContainer[$language][$base]['php'][$key]));
                                                                                                                                                              }
                                                                                                                                                              return \nl2br(static::$languageContainer[$language][$base]['php'][$key]);
                                                                                                                                              Severity: Major
                                                                                                                                              Found in app/Language.php and 2 other locations - About 45 mins to fix
                                                                                                                                              app/Language.php on lines 179..184
                                                                                                                                              app/Language.php on lines 188..193

                                                                                                                                              Duplicated Code

                                                                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                              Tuning

                                                                                                                                              This issue has a mass of 96.

                                                                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                              Refactorings

                                                                                                                                              Further Reading

                                                                                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                      if (isset(static::$languageContainer[$language][$moduleName]['php'][$key])) {
                                                                                                                                                          if ($encode) {
                                                                                                                                                              return \nl2br(Purifier::encodeHtml(static::$languageContainer[$language][$moduleName]['php'][$key]));
                                                                                                                                                          }
                                                                                                                                                          return \nl2br(static::$languageContainer[$language][$moduleName]['php'][$key]);
                                                                                                                                              Severity: Major
                                                                                                                                              Found in app/Language.php and 2 other locations - About 45 mins to fix
                                                                                                                                              app/Language.php on lines 188..193
                                                                                                                                              app/Language.php on lines 199..204

                                                                                                                                              Duplicated Code

                                                                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                              Tuning

                                                                                                                                              This issue has a mass of 96.

                                                                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                              Refactorings

                                                                                                                                              Further Reading

                                                                                                                                              Similar blocks of code found in 3 locations. Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                          if (isset(static::$languageContainer[$language][$secondModuleName]['php'][$key])) {
                                                                                                                                                              if ($encode) {
                                                                                                                                                                  return \nl2br(Purifier::encodeHtml(static::$languageContainer[$language][$secondModuleName]['php'][$key]));
                                                                                                                                                              }
                                                                                                                                                              return \nl2br(static::$languageContainer[$language][$secondModuleName]['php'][$key]);
                                                                                                                                              Severity: Major
                                                                                                                                              Found in app/Language.php and 2 other locations - About 45 mins to fix
                                                                                                                                              app/Language.php on lines 179..184
                                                                                                                                              app/Language.php on lines 199..204

                                                                                                                                              Duplicated Code

                                                                                                                                              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                                                                                              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                                                                                              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                                                                                              Tuning

                                                                                                                                              This issue has a mass of 96.

                                                                                                                                              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                                                                                              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                                                                                              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                                                                                              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                                                                                              Refactorings

                                                                                                                                              Further Reading

                                                                                                                                              Avoid variables with short names like $j. Configured minimum length is 3.
                                                                                                                                              Open

                                                                                                                                                              $j = $count % 100;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpmd

                                                                                                                                              ShortVariable

                                                                                                                                              Since: 0.2

                                                                                                                                              Detects when a field, local, or parameter has a very short name.

                                                                                                                                              Example

                                                                                                                                              class Something {
                                                                                                                                                  private $q = 15; // VIOLATION - Field
                                                                                                                                                  public static function main( array $as ) { // VIOLATION - Formal
                                                                                                                                                      $r = 20 + $this->q; // VIOLATION - Local
                                                                                                                                                      for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                                                                                                                                          $r += $this->q;
                                                                                                                                                      }
                                                                                                                                                  }
                                                                                                                                              }

                                                                                                                                              Source https://phpmd.org/rules/naming.html#shortvariable

                                                                                                                                              Avoid variables with short names like $i. Configured minimum length is 3.
                                                                                                                                              Open

                                                                                                                                                              $i = $count % 10;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpmd

                                                                                                                                              ShortVariable

                                                                                                                                              Since: 0.2

                                                                                                                                              Detects when a field, local, or parameter has a very short name.

                                                                                                                                              Example

                                                                                                                                              class Something {
                                                                                                                                                  private $q = 15; // VIOLATION - Field
                                                                                                                                                  public static function main( array $as ) { // VIOLATION - Formal
                                                                                                                                                      $r = 20 + $this->q; // VIOLATION - Local
                                                                                                                                                      for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                                                                                                                                                          $r += $this->q;
                                                                                                                                                      }
                                                                                                                                                  }
                                                                                                                                              }

                                                                                                                                              Source https://phpmd.org/rules/naming.html#shortvariable

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

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

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

                                                                                                                                                      if (static::$language) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                                                                                                                                                  private static $pluralizeCache = [];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

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

                                                                                                                                                   * Set temporary language.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

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

                                                                                                                                                          return static::$language;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * Clear temporary language.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * Language files format.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                   * Default language code.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                  const FORMAT = 'json';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                      if (static::$temporaryLanguage) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @return string
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                      static::$temporaryLanguage = $language;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                   * @param string $language
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                   * Custom language directory.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                  private static $temporaryLanguage = '';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * Short current language.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                      return static::$language = empty($language) ? \App\Config::main('default_language') : $language;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                                                                                                                                                  const LANG_TYPE = ['php', 'js'];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                          $language = User::getCurrentUserModel()->getDetail('language');
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                   * Contains module language translations.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @return string -
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                      if (!empty(\App\Session::get('language'))) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          $language = \App\Session::get('language');
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                   * @var string
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                  private static $language = '';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                  /** @var string Temporary language. */
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @var bool|string
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                   * @see https://en.wikipedia.org/wiki/IETF_language_tag
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                  public const DEFAULT_LANG = 'en-US';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                  public static $customDirectory = 'custom';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * Pluralize cache.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                  protected static $languageContainer;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * Function that returns current language.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                   * Allowed types of language variables.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                  private static $shortLanguage = false;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                      return str_replace('-', $separator, static::getLanguage());
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                  /** @var string Current language. */
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                  public static function getLanguage()
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                  public static function getLanguageTag($separator = '_')
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                  public static function setTemporaryLanguage(string $language)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                          return static::$temporaryLanguage;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * Get IETF language tag.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @param mixed $separator
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @return string
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                   * @return string
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                  public static function getShortLanguageName()
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * Functions that gets translated string.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                          if (isset(static::$languageContainer[$language][$base]['php'][$key])) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                          return \nl2br(static::$languageContainer[$language]['_Base']['php'][$key]);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                  public static function translateArgs($key, $moduleName = '_Base')
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @param string|null $lang
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

                                                                                                                                              Line exceeds 120 characters; contains 121 characters
                                                                                                                                              Open

                                                                                                                                                          $secondModuleName = str_replace([':', '.'], [\DIRECTORY_SEPARATOR, \DIRECTORY_SEPARATOR], $secondModuleName);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          if ($encode) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      return $encode ? Purifier::encodeHtml($key) : $key;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      $translate = '';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          } elseif (($translated = self::translateSingleMod($label, 'Other:HelpInfo')) !== $label) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      return $translate;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @param mixed  $currentLanguage
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

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

                                                                                                                                                          Log::warning('Invalid module name - module: ' . var_export($moduleName, true));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          $moduleName = Module::getModuleName($moduleName);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return \nl2br(Purifier::encodeHtml(static::$languageContainer[$language][$secondModuleName]['php'][$key]));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                      if (!$lang) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Line exceeds 120 characters; contains 160 characters
                                                                                                                                              Open

                                                                                                                                                  public static function translate(string $key, string $moduleName = '_Base', ?string $language = null, bool $encode = true, ?string $secondModuleName = null)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          $moduleName = str_replace([':', '.'], [\DIRECTORY_SEPARATOR, \DIRECTORY_SEPARATOR], $moduleName);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          if (isset(static::$languageContainer[$language][$secondModuleName]['php'][$key])) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      if (0 === strpos($moduleName, 'Settings')) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                   * Function that returns current language short name.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @param string|null $language         - language of translation
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                   * @param string              $view
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                      if (static::$shortLanguage) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      return static::$shortLanguage = (empty($match[0])) ? \Locale::getPrimaryLanguage(self::DEFAULT_LANG) : $match[0];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          $lang = static::getLanguage();
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      return \Locale::parseLocale($lang)['region'] ?? substr($lang, -2);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @param bool        $encode           - When no translation was found do encode the output
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @return string - translated string
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          $language = static::getLanguage();
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              return \nl2br(static::$languageContainer[$language][$base]['php'][$key]);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      if (isset(static::$languageContainer[$language]['_Base']['php'][$key])) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

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

                                                                                                                                                      if (empty($key)) { // nothing to translate
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                          $secondModuleName = str_replace([':', '.'], [\DIRECTORY_SEPARATOR, \DIRECTORY_SEPARATOR], $secondModuleName);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                                                                                                                                                   * @param string $key        - string which need to be translated
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      static::$temporaryLanguage = false;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                   * Function that returns region for language prefix.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                              return \nl2br(Purifier::encodeHtml(static::$languageContainer[$language][$moduleName]['php'][$key]));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                              return \nl2br(static::$languageContainer[$language][$secondModuleName]['php'][$key]);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      // Lookup for the translation in base module, in case of sub modules, before ending up with common strings
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              $translate = $translated;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @param string $moduleName      - module scope in which the translation need to be check
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

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

                                                                                                                                                      static::loadLanguageFile($language, $moduleName);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          if ($encode) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          return static::translate($key, $moduleName, static::DEFAULT_LANG, $encode, $secondModuleName);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      if (\in_array($view, explode(',', $fieldModel->get('helpinfo')))) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          if (($translated = self::translateSingleMod($key, 'Other:HelpInfo')) !== $key) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              $translate = $translated;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                      return \App\Purifier::encodeHtml(static::translate($key, $moduleName, $currentLanguage));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                  public static function getLanguageRegion(?string $lang = null): string
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          return $key;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                          $base = 'Settings' . \DIRECTORY_SEPARATOR . '_Base';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                      \App\Log::info("Cannot translate this: '$key' for module '$moduleName', lang: $language");
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @return string
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @param string $key             - string which need to be translated
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                              if ($encode) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return \nl2br(Purifier::encodeHtml(static::$languageContainer[$language][$base]['php'][$key]));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * Functions get translate help info.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

                                                                                                                                              Line exceeds 120 characters; contains 121 characters
                                                                                                                                              Open

                                                                                                                                                      return static::$shortLanguage = (empty($match[0])) ? \Locale::getPrimaryLanguage(self::DEFAULT_LANG) : $match[0];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                          return \nl2br(static::$languageContainer[$language][$moduleName]['php'][$key]);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                   * Functions that gets translated string by $args.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          return static::$shortLanguage;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      preg_match('/^[a-z]+/i', static::getLanguage(), $match);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @return string
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      if (is_numeric($moduleName)) { // ok, we have a tab id, lets turn it into name
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                      if (\App\Config::performance('recursiveTranslate') && static::DEFAULT_LANG !== $language) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          $key = "{$fieldModel->getModuleName()}|$label";
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                   * @param string $moduleName - module scope in which the translation need to be check
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                  public static function clearTemporaryLanguage()
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          return $key;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                      if (isset(static::$languageContainer[$language][$moduleName]['php'][$key])) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      static::loadLanguageFile($language);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              return \nl2br(Purifier::encodeHtml(static::$languageContainer[$language]['_Base']['php'][$key]));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                   * Functions that gets translated string with encoding html.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @return string - translated string with encoding html
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @return string - translated string
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                   * @param string      $moduleName       - module scope in which the translation need to be check
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      if (!$language || ($language && 5 !== \strlen($language))) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          static::loadLanguageFile($language, $secondModuleName);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Line exceeds 120 characters; contains 127 characters
                                                                                                                                              Open

                                                                                                                                                                  return \nl2br(Purifier::encodeHtml(static::$languageContainer[$language][$secondModuleName]['php'][$key]));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          static::loadLanguageFile($language, $base);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @param \Vtiger_Field_Model $fieldModel
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                  public static function getTranslateHelpInfo(\Vtiger_Field_Model $fieldModel, string $view): string
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                  public static function translateEncodeHtml($key, $moduleName = '_Base', $currentLanguage = false)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                                                                                                                                                   * @param string      $key              - string which need to be translated
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @param string      $secondModuleName - Additional module name to be translated when not in $moduleName
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                  public static function translate(string $key, string $moduleName = '_Base', ?string $language = null, bool $encode = true, ?string $secondModuleName = null)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      if (\is_array($moduleName)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                      if ($secondModuleName) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if ($encode) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          $label = $fieldModel->getFieldLabel();
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                      $formattedString = static::translate($key, $moduleName);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                   * @param string $moduleName Module scope in which the translation need to be check
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                   * @return string
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @param string $moduleName
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      $return = [];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                          $postfix = static::getPluralized((int) $count);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                   * Translation function based on only one file.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                      static::loadLanguageFile($language, $moduleName);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

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

                                                                                                                                                              $file = \DIRECTORY_SEPARATOR . 'languages' . \DIRECTORY_SEPARATOR . $language . \DIRECTORY_SEPARATOR . $moduleName . '.' . static::FORMAT;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @param string $language
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                   * @see https://www.i18next.com/plurals.html
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                   * @param bool|string $language
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @return string
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                      if (\App\Config::performance('recursiveTranslate') && static::DEFAULT_LANG !== $language) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @param string $language
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      return $formattedString;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @param string      $moduleName
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      if (isset(static::$languageContainer[$language][$moduleName]['php'][$key])) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                   * Load language file.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      if (!isset(static::$languageContainer[$language][$moduleName])) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Line exceeds 120 characters; contains 154 characters
                                                                                                                                              Open

                                                                                                                                                              $file = \DIRECTORY_SEPARATOR . 'languages' . \DIRECTORY_SEPARATOR . $language . \DIRECTORY_SEPARATOR . $moduleName . '.' . static::FORMAT;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                                                                                                                                                      if (isset(static::$languageContainer[$language][$moduleName]['js'])) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                      return vsprintf(static::translate($key . $postfix, $moduleName), [$count]);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

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

                                                                                                                                                   * @param mixed       $encode
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      if (!$language) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          return static::translateSingleMod($key, $moduleName, static::DEFAULT_LANG, $encode);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                      if (0 === strpos($moduleName, 'Settings')) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                   * @param int    $count      Quantityu for plural determination
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @return string
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          if ($encode) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                              static::$languageContainer[$language][$moduleName] = [];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  static::$languageContainer[$language][$moduleName] = Json::decode(file_get_contents($langFile), true) ?? [];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                  public static function getFromFile($moduleName, $language)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      static::loadLanguageFile($language, $moduleName);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                   * Functions that gets translated string.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                  public static function getSingularModuleName($moduleName)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      return "SINGLE_$moduleName";
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                              $langCustomFile = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . static::$customDirectory . $file;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                                      if (\is_array($args) && !empty($args)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      if (isset(static::$pluralizeCache[$count])) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                   * Get singular module name.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                  public static function loadLanguageFile($language, $moduleName = '_Base')
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

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

                                                                                                                                                      return $encode ? Purifier::encodeHtml($key) : $key;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                              $langFile = ROOT_DIRECTORY . $file;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  $translation = Json::decode(file_get_contents($langCustomFile), true) ?? [];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          $return = static::$languageContainer[$language][$moduleName]['js'];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @see https://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html?id=l10n/pluralforms#pluralforms-list
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                              if (file_exists($langFile)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                          static::$languageContainer[$language][$moduleName][$type][$key] = $val;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Line exceeds 120 characters; contains 135 characters
                                                                                                                                              Open

                                                                                                                                                              Cache::save('LanguageFiles', $language . $moduleName, static::$languageContainer[$language][$moduleName], Cache::LONG);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * Get language from file.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @return string[]
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          $base = 'Settings' . \DIRECTORY_SEPARATOR . '_Base';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                   * Functions that gets pluralized translated string.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

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

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

                                                                                                                                                  public static function translateSingularModuleName($moduleName)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                              static::$languageContainer[$language][$moduleName] = Cache::get('LanguageFiles', $language . $moduleName);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                                  \App\Log::info("Language file does not exist, module: $moduleName ,language: $language");
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                  public static function getJsStrings($moduleName)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      $moduleName = str_replace([':', '.'], [\DIRECTORY_SEPARATOR, \DIRECTORY_SEPARATOR], $moduleName);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                          if (Cache::has('LanguageFiles', $language . $moduleName)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      static::loadLanguageFile($language, $moduleName);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          $formattedString = \call_user_func_array('vsprintf', [$formattedString, $args]);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                  public static function translatePluralized($key, $moduleName, $count)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          $postfix = static::$pluralizeCache[$count];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @param string      $key
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          $language = static::getLanguage();
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              return Purifier::encodeHtml(static::$languageContainer[$language][$moduleName]['php'][$key]);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                          return static::$languageContainer[$language][$moduleName]['php'][$key];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @param string $moduleName
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @return string
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * Translate singular module name.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @param string $moduleName
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @param string $moduleName
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Line exceeds 120 characters; contains 128 characters
                                                                                                                                              Open

                                                                                                                                                                  static::$languageContainer[$language][$moduleName] = Json::decode(file_get_contents($langFile), true) ?? [];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      if (isset(static::$languageContainer[$language][$moduleName])) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      $args = \array_slice(\func_get_args(), 2);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                  public static function translateSingleMod($key, $moduleName = '_Base', $language = false, $encode = true)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      return static::translate("SINGLE_$moduleName", $moduleName);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Line exceeds 120 characters; contains 122 characters
                                                                                                                                              Open

                                                                                                                                                              static::$languageContainer[$language][$moduleName] = Cache::get('LanguageFiles', $language . $moduleName);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                              Cache::save('LanguageFiles', $language . $moduleName, static::$languageContainer[$language][$moduleName], Cache::LONG);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                          return static::$languageContainer[$language][$moduleName];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      $language = static::getLanguage();
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @param string $key        String which need to be translated
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                      $moduleName = str_replace([':', '.'], [\DIRECTORY_SEPARATOR, \DIRECTORY_SEPARATOR], $moduleName);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if (file_exists($langCustomFile)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  foreach ($translation as $type => $rows) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                      foreach ($rows as $key => $val) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if (!file_exists($langFile) && !file_exists($langCustomFile)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @param string $moduleName
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                          'nb', 'ne', 'nl', 'nn', 'nso', 'or', 'pa', 'pap', 'pms', 'ps', 'pt', 'rm', 'rw', 'sat', 'sco', 'sd', 'se', 'si', 'so', 'son', 'sq', 'sv', 'sw',
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                              $j = $count % 100;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                   * - 3 or more forms : key_X with X indented for each plural form.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      if (\in_array($lang, ['ach', 'ak', 'am', 'arn', 'br', 'fa', 'fil', 'fr', 'gun', 'ln', 'mfe', 'mg', 'mi', 'oc', 'pt-BR', 'tg', 'ti', 'tr', 'uz', 'wa'])) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          return (1 !== $count) ? '_1' : '_0';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return '_0';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              $j = $count % 100;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if (1 === $i && 11 !== $j) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if (8 !== $count && 11 !== $count) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      static::loadLanguageFile($language);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      //Two plural forms
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              $i = $count % 10;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if (2 === $count) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @see https://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html?id=l10n/pluralforms for whole plural rules used by getText
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                          return '_0';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Line exceeds 120 characters; contains 161 characters
                                                                                                                                              Open

                                                                                                                                                      if (\in_array($lang, ['ach', 'ak', 'am', 'arn', 'br', 'fa', 'fil', 'fr', 'gun', 'ln', 'mfe', 'mg', 'mi', 'oc', 'pt-BR', 'tg', 'ti', 'tr', 'uz', 'wa'])) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          case 'is':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if (1 === $i && 11 !== $j) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return '_1';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          case 'csb':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              $i = $count % 10;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if ($i >= 2 && $i <= 4 && ($j < 10 || $j >= 20)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                                  return '_1';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                          if (isset(static::$languageContainer[$language][$base]['js'])) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      if (isset(static::$languageContainer[$language]['_Base']['js'])) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                  private static function getPluralized($count)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                      //No plural form
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      if (\in_array($lang, ['ay', 'bo', 'cgg', 'dz', 'id', 'ja', 'jbo', 'ka', 'km', 'ko', 'lo', 'ms', 'my', 'sah', 'su', 'th', 'tt', 'ug', 'vi', 'wo', 'zh'])) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              return (1 !== $count % 10 || 11 === $count % 100) ? '_1' : '_0';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if ($count >= 2 && $count <= 4) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          case 'lv':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              return '_2';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if (1 === $count) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return '_1';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

                                                                                                                                              Line exceeds 120 characters; contains 162 characters
                                                                                                                                              Open

                                                                                                                                                      if (\in_array($lang, ['ay', 'bo', 'cgg', 'dz', 'id', 'ja', 'jbo', 'ka', 'km', 'ko', 'lo', 'ms', 'my', 'sah', 'su', 'th', 'tt', 'ug', 'vi', 'wo', 'zh'])) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          case 'ru':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if (1 === $count) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                          case 'pl':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              $i = $count % 10;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              return '_2';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Line exceeds 120 characters; contains 162 characters
                                                                                                                                              Open

                                                                                                                                                   * @see https://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html?id=l10n/pluralforms for whole plural rules used by getText
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @param float $count Quantityu for plural determination
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

                                                                                                                                              Line exceeds 120 characters; contains 166 characters
                                                                                                                                              Open

                                                                                                                                                          'af', 'an', 'anp', 'as', 'ast', 'az', 'bg', 'bn', 'brx', 'ca', 'da', 'de', 'doi', 'dz', 'el', 'en', 'eo', 'es', 'et', 'eu', 'ff', 'fi', 'fo', 'fur', 'fy',
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Line exceeds 120 characters; contains 160 characters
                                                                                                                                              Open

                                                                                                                                                          'gl', 'gu', 'ha', 'he', 'hi', 'hne', 'hu', 'hy', 'ia', 'it', 'kk', 'kl', 'kn', 'ku', 'ky', 'lb', 'mai', 'mk', 'ml', 'mn', 'mni', 'mr', 'nah', 'nap',
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      switch ($lang) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          case 'uk':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                              $i = $count % 10;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return '_1';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return '_0';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if (1 === $count) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                          case 'ro':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                          case 'bs':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if (1 === $count) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return '_1';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                                  return '_0';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return '_1';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return '_0';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * Global patterns for keycode are as below :
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Line exceeds 120 characters; contains 155 characters
                                                                                                                                              Open

                                                                                                                                                          'nb', 'ne', 'nl', 'nn', 'nso', 'or', 'pa', 'pap', 'pms', 'ps', 'pt', 'rm', 'rw', 'sat', 'sco', 'sd', 'se', 'si', 'so', 'son', 'sq', 'sv', 'sw',
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          case 'be':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          case 'sr':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              $j = $count % 100;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                              if (1 == $i && 11 != $j) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              $i = $count % 10;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                      return $return;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * This function returns the modified keycode to match the plural form(s) of a given language and a given count with the same pattern used by i18next JS library
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * - No plural form : only one non modified key is needed :)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                              $j = $count % 100;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          case 'lt':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              return '_2';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              $j = $count % 100;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          static::loadLanguageFile($language, $base);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Line exceeds 120 characters; contains 164 characters
                                                                                                                                              Open

                                                                                                                                                   * This function returns the modified keycode to match the plural form(s) of a given language and a given count with the same pattern used by i18next JS library
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                                  return '_0';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if ($i >= 2 && ($j < 10 || $j >= 20)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if (1 == $i && 11 != $j) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                              if (0 !== $count) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                              return '_2';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return '_0';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return '_1';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          'gl', 'gu', 'ha', 'he', 'hi', 'hne', 'hu', 'hy', 'ia', 'it', 'kk', 'kl', 'kn', 'ku', 'ky', 'lb', 'mai', 'mk', 'ml', 'mn', 'mni', 'mr', 'nah', 'nap',
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          case 'me':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              $j = $count % 100;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if ($i >= 2 && $i <= 4 && ($j < 10 || $j >= 20)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          'ta', 'te', 'tk', 'ur', 'yo',
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if ($i >= 2 && $i <= 4 && ($j < 10 || $j >= 20)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              return '_2';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          case 'cs':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          case 'sk':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return '_0';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return '_1';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              return '_2';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              return '_2';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              $j = $count % 100;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                              if (1 === $count) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          $return = array_merge(static::$languageContainer[$language]['_Base']['js'], $return);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                   * - 2 forms : unmodified key for singular values and 'key_PLURAL' for plural values
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      //Extract language code from locale with special cases
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          $lang = 'pt-BR';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          return ($count > 1) ? '_1' : '_0';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                                  return '_0';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                                  return '_1';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return '_0';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if (0 === $count || ($j > 0 && $j < 20)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              $return = array_merge(static::$languageContainer[$language][$base]['js'], $return);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @see https://www.i18next.com/plurals.html for some examples
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @return string Pluralized key to look for
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      if (0 === strcasecmp(static::getLanguage(), 'pt-BR')) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          $lang = static::getShortLanguageName();
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      if (\in_array($lang, [
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      ])) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          case 'hr':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                              return '_2';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          case 'cy':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

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

                                                                                                                                                          'af', 'an', 'anp', 'as', 'ast', 'az', 'bg', 'bn', 'brx', 'ca', 'da', 'de', 'doi', 'dz', 'el', 'en', 'eo', 'es', 'et', 'eu', 'ff', 'fi', 'fo', 'fur', 'fy',
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              $i = $count % 10;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if ($i >= 2 && $i <= 4 && ($j < 10 || $j >= 20)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              return '_3';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                                  return '_3';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                                                                                                                                                              if (1 === $count) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return '_0';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return '_0';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

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

                                                                                                                                                                  return '_2';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return '_1';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              return '_3';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                              return '_3';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

                                                                                                                                                              return array_column(Cache::get('getAllLanguages', $cacheKey), 'name', 'prefix');
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              $actives[$row['prefix']] = $row;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                      return Cache::save('getLangInfo', $prefix, (new Db\Query())->from('vtiger_language')->where(['prefix' => $prefix])->one());
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return '_0';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if (1 === $count) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

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

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

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

                                                                                                                                                      return static::getLangInfo($prefix)['name'] ?? null;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                      if (Cache::has('getAllLanguages', $cacheKey)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                                  return '_1';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return '_2';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                          case 'ga':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if ($count > 2 && $count < 7) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                          case 'ar':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if (1 === $count) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              return '';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      $dataReader = (new Db\Query())->from('vtiger_language')->createCommand()->query();
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                              if (2 === $count || 12 === $count) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return '_2';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                                  return '_1';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                                  return '_2';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

                                                                                                                                                   * Function to get the label name of the Langauge package.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                   * @return bool|string
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

                                                                                                                                                      $actives = [];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

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

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

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

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

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

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

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   *
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          case 'gd':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      $cacheKey = $active ? 'Active' : 'All';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          return Cache::get('getLangInfo', $prefix);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          case 'mt':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              $j = $count % 100;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                                  return '_3';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              return '_5';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          return Cache::get('getAllLanguages', $cacheKey);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  /**
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                                  return '_2';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                                  return '_2';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              if ($count * 100 >= 11) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * @param string $prefix
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   *
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          if (1 === (int) $row['active']) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   *
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Line exceeds 120 characters; contains 131 characters
                                                                                                                                              Open

                                                                                                                                                      return Cache::save('getLangInfo', $prefix, (new Db\Query())->from('vtiger_language')->where(['prefix' => $prefix])->one());
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              if (3 === $count) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * @param string $language
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              if (0 === $count) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * Function return languages data.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   *
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          $all[$row['prefix']] = $row;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      $dataReader->close();
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                                  return '_0';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   *
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * @param bool $allData
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          if (!$allData) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      Cache::save('getAllLanguages', 'All', $all);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      Cache::save('getAllLanguages', 'Active', $actives);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   */
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              if ($count > 2 && $count < 20) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              if (1 === $count) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                                  return '_2';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              if (0 === $count || ($j > 1 && $j < 11)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              return '_3';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              if (1 === $j) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          case 'sl':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              if (2 === $j) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              if (3 === $j || 4 === $j) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              if (2 === $count) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                                  return '_1';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              return '_4';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              if (2 === $count) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                                  return '_4';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          default:
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                                  return '_1';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      $all = [];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          Cache::save('getLangInfo', $row['prefix'], $row);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * @param bool $active
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          return array_column(Cache::get('getAllLanguages', $cacheKey), 'name', 'prefix');
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  public static function getLangInfo(string $prefix)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * @return array
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      if (Cache::has('getLangInfo', $prefix)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * @param string $prefix
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * @param string $fileName
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              if (1 === $count || 11 === $count) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          case 'kw':
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              if ($j > 10 && $j < 20) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              if ($count > 6 && $count < 11) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                                  return '_0';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                                  return '_1';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  public static function getLanguageLabel(string $prefix)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  public static function getAll(bool $active = true, bool $allData = false)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      if (!$allData) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      return Cache::get('getAllLanguages', $cacheKey);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * Function return languange data.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * Translation modification.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              return '_3';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              $j = $count % 100;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                                  return '_0';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              if (2 === $count) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              if ($count % 100 >= 3 && $count % 100 <= 10) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      while ($row = $dataReader->read()) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      } else {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      );
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          } else {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  /**
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   */
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          unset($translations[$type][$label]);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      $defaultCharset = strtolower(\App\Config::main('default_charset'));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              $loc .= \DIRECTORY_SEPARATOR . $name;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          LC_ALL,
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          if (false !== strpos($localeSetting, '=')) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * @return string
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * @param string $type
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          $loc = '';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              [$category, $locale] = explode('=', $localeSetting);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Line exceeds 120 characters; contains 205 characters
                                                                                                                                              Open

                                                                                                                                                      return Utils::mbUcfirst(locale_get_region($prefix) === strtoupper(locale_get_primary_language($prefix)) ? locale_get_display_language($prefix, $prefix) : locale_get_display_name($prefix, $prefix));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   *
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      $fileDirectory = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . implode(\DIRECTORY_SEPARATOR, $fileLocation) . '.' . static::FORMAT;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          foreach ($fileLocation as $name) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * @param string $label
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                                  throw new Exceptions\AppException('ERR_NO_PERMISSIONS_TO_CREATE_DIRECTORIES');
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          \Locale::acceptFromHttp(self::DEFAULT_LANG) . ".$defaultCharset",
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * @param string $prefix
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      if ($remove) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  /**
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      return locale_parse($prefix)['region'];
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   *
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Line exceeds 120 characters; contains 152 characters
                                                                                                                                              Open

                                                                                                                                                  public static function translationModify(string $language, string $fileName, string $type, string $label, string $translation, bool $remove = false)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      $fileLocation = explode('__', $fileName, 2);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      array_unshift($fileLocation, 'custom', 'languages', $language);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          if ('LC_COLLATE' !== $category && 'LC_CTYPE' !== $category && \defined($category)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   *
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   */
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * @param string $translation
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * @throws Exceptions\AppException
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          $translations = Json::decode(file_get_contents($fileDirectory), true);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      if (false === Json::save($fileDirectory, $translations)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * Set locale information.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   */
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      $original = explode(';', setlocale(LC_ALL, 0));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              $locale = $localeSetting;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * @param string $prefix
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * @return mixed
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * @param bool   $remove
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Line exceeds 120 characters; contains 133 characters
                                                                                                                                              Open

                                                                                                                                                      $fileDirectory = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . implode(\DIRECTORY_SEPARATOR, $fileLocation) . '.' . static::FORMAT;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      Cache::delete('LanguageFiles', $language . str_replace('__', \DIRECTORY_SEPARATOR, $fileName));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  public static function initLocale()
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          \Locale::acceptFromHttp(self::getLanguage()) . '.' . $defaultCharset,
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      foreach ($original as $localeSetting) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              $category = 'LC_ALL';
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   */
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      return Utils::mbUcfirst(locale_get_region($prefix) === strtoupper(locale_get_primary_language($prefix)) ? locale_get_display_language($prefix, $prefix) : locale_get_display_name($prefix, $prefix));
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * Get region from language prefix.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  public static function getRegion(string $prefix)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   *
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      if (file_exists($fileDirectory)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          throw new Exceptions\AppException('ERR_CREATE_FILE_FAILURE');
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      setlocale(
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   * Get display language name.
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          array_pop($fileLocation);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              if (!file_exists(ROOT_DIRECTORY . $loc) && !mkdir(ROOT_DIRECTORY . $loc, 0755)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                      $translations[$type][$label] = $translation;
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                              setlocale(\constant($category), $locale);
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  /**
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          \Locale::acceptFromHttp(\App\Config::main('default_language')) . '.' . $defaultCharset,
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                   *
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  public static function getDisplayName(string $prefix)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                  public static function translationModify(string $language, string $fileName, string $type, string $label, string $translation, bool $remove = false)
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          \Locale::acceptFromHttp(self::DEFAULT_LANG) . '.utf8'
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              Spaces must be used to indent lines; tabs are not allowed
                                                                                                                                              Open

                                                                                                                                                          }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in app/Language.php by phpcodesniffer

                                                                                                                                              There are no issues that match your filters.

                                                                                                                                              Category
                                                                                                                                              Status