YetiForceCompany/YetiForceCRM

View on GitHub
include/runtime/Theme.php

Summary

Maintainability
C
1 day
Test Coverage
F
43%

Function getOrignOrDefaultImgPath has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public static function getOrignOrDefaultImgPath($imageFileName, $defaultFileName)
    {
        $basePath = '';
        if (!IS_PUBLIC_DIR) {
            $basePath = 'public_html/';
Severity: Minor
Found in include/runtime/Theme.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 getOrignOrDefaultImgPath has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function getOrignOrDefaultImgPath($imageFileName, $defaultFileName)
    {
        $basePath = '';
        if (!IS_PUBLIC_DIR) {
            $basePath = 'public_html/';
Severity: Minor
Found in include/runtime/Theme.php - About 1 hr to fix

    Avoid too many return statements within this method.
    Open

            return false;
    Severity: Major
    Found in include/runtime/Theme.php - About 30 mins to fix

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

          public static function getImagePath($imageFileName)
      Severity: Major
      Found in include/runtime/Theme.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;
      }
      

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

          public static function getOrignOrDefaultImgPath($imageFileName, $defaultFileName)
      Severity: Major
      Found in include/runtime/Theme.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;
      }
      

      Avoid using static access to class 'Vtiger_Loader' in method 'getImagePath'.
      Open

              $completeFallBackThemePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $fallbackPath);
      Severity: Minor
      Found in include/runtime/Theme.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 'Vtiger_Loader' in method 'getOrignOrDefaultImgPath'.
      Open

                  $completeImageFilePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $imageFilePath);
      Severity: Minor
      Found in include/runtime/Theme.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 'Vtiger_Loader' in method 'getOrignOrDefaultImgPath'.
      Open

                  $completeImageFilePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $imageFilePath);
      Severity: Minor
      Found in include/runtime/Theme.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 'Vtiger_Loader' in method 'getImagePath'.
      Open

              $completeImageFilePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $imageFilePath);
      Severity: Minor
      Found in include/runtime/Theme.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 'Vtiger_Loader' in method 'getThemePath'.
      Open

              $completeSelectedThemePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $selectedThemePath);
      Severity: Minor
      Found in include/runtime/Theme.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 'Vtiger_Loader' in method 'getOrignOrDefaultImgPath'.
      Open

                  $completeFallBackThemePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $fallbackPath);
      Severity: Minor
      Found in include/runtime/Theme.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 'Vtiger_Loader' in method 'getThemeStyle'.
      Open

              $completeFilePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $filePath);
      Severity: Minor
      Found in include/runtime/Theme.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 'Vtiger_Loader' in method 'getThemePath'.
      Open

              $completeFallBackThemePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $fallBackThemePath);
      Severity: Minor
      Found in include/runtime/Theme.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 'Vtiger_Loader' in method 'getOrignOrDefaultImgPath'.
      Open

                  $completeFallBackThemePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $fallbackPath);
      Severity: Minor
      Found in include/runtime/Theme.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 'Vtiger_Util_Helper' in method 'getAllSkins'.
      Open

              return Vtiger_Util_Helper::getAllSkins();
      Severity: Minor
      Found in include/runtime/Theme.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 'Vtiger_Loader' in method 'getImagePath'.
      Open

              $completeImageFilePath = Vtiger_Loader::resolveNameToPath('~' . 'public_html/' . $imageFilePath);
      Severity: Minor
      Found in include/runtime/Theme.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 "/images/" 3 times.
      Open

              $imageFilePath = 'layouts/' . self::getLayoutName() . '/images/' . $imageFileName;
      Severity: Critical
      Found in include/runtime/Theme.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 "~public_html/" 9 times.
      Open

              $completeFilePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $filePath);
      Severity: Critical
      Found in include/runtime/Theme.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 "images" 4 times.
      Open

                  $imageFilePath = self::getThemePath() . '/' . 'images' . '/' . $imageFileName . $type;
      Severity: Critical
      Found in include/runtime/Theme.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 "layouts/" 3 times.
      Open

              $imageFilePath = 'layouts/' . self::getLayoutName() . '/images/' . $imageFileName;
      Severity: Critical
      Found in include/runtime/Theme.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 "public_html/" 3 times.
      Open

                  $basePath = 'public_html/';
      Severity: Critical
      Found in include/runtime/Theme.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.

      Saw unextractable annotation for comment '* @return <array>'</array>
      Open

           * @return <Array>
      Severity: Info
      Found in include/runtime/Theme.php by phan

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

              $theme = \App\User::getCurrentUserModel()->getDetail('theme');
      Severity: Critical
      Found in include/runtime/Theme.php by phan

      Saw unextractable annotation for comment '* @return <string> - returns file path if exists or false;'</string>
      Open

           * @return <string/boolean> - returns file path if exists or false;
      Severity: Info
      Found in include/runtime/Theme.php by phan

      Saw unextractable annotation for comment '* @return <string boolean> - file path , false if not exists'</string>
      Open

           * @return <string / Boolean> - file path , false if not exists
      Severity: Info
      Found in include/runtime/Theme.php by phan

      Saw unextractable annotation for comment '* @return <string> - returns file path if exists or false;'</string>
      Open

           * @return <string/boolean> - returns file path if exists or false;
      Severity: Info
      Found in include/runtime/Theme.php by phan

      Returning type false but getThemePath() is declared to return string
      Open

              return false;
      Severity: Minor
      Found in include/runtime/Theme.php by phan

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

              foreach ($allowedImgTypes as $type) {
                  $imageFilePath = self::getThemePath() . '/' . 'images' . '/' . $defaultFileName . $type;
                  $completeImageFilePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $imageFilePath);
                  if (file_exists($completeImageFilePath)) {
                      return $basePath . $imageFilePath;
      Severity: Major
      Found in include/runtime/Theme.php and 1 other location - About 3 hrs to fix
      include/runtime/Theme.php on lines 78..89

      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 142.

      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 2 locations. Consider refactoring.
      Open

              foreach ($allowedImgTypes as $type) {
                  $imageFilePath = self::getThemePath() . '/' . 'images' . '/' . $imageFileName . $type;
                  $completeImageFilePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $imageFilePath);
                  if (file_exists($completeImageFilePath)) {
                      return $basePath . $imageFilePath;
      Severity: Major
      Found in include/runtime/Theme.php and 1 other location - About 3 hrs to fix
      include/runtime/Theme.php on lines 90..101

      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 142.

      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 excessively long variable names like $completeImageFilePath. Keep variable name length under 20.
      Open

              $completeImageFilePath = Vtiger_Loader::resolveNameToPath('~' . 'public_html/' . $imageFilePath);
      Severity: Minor
      Found in include/runtime/Theme.php by phpmd

      LongVariable

      Since: 0.2

      Detects when a field, formal or local variable is declared with a long name.

      Example

      class Something {
          protected $reallyLongIntName = -3; // VIOLATION - Field
          public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
              $otherReallyLongName = -5; // VIOLATION - Local
              for ($interestingIntIndex = 0; // VIOLATION - For
                   $interestingIntIndex < 10;
                   $interestingIntIndex++ ) {
              }
          }
      }

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

      Avoid excessively long variable names like $completeImageFilePath. Keep variable name length under 20.
      Open

                  $completeImageFilePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $imageFilePath);
      Severity: Minor
      Found in include/runtime/Theme.php by phpmd

      LongVariable

      Since: 0.2

      Detects when a field, formal or local variable is declared with a long name.

      Example

      class Something {
          protected $reallyLongIntName = -3; // VIOLATION - Field
          public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
              $otherReallyLongName = -5; // VIOLATION - Local
              for ($interestingIntIndex = 0; // VIOLATION - For
                   $interestingIntIndex < 10;
                   $interestingIntIndex++ ) {
              }
          }
      }

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

      Avoid excessively long variable names like $completeFallBackThemePath. Keep variable name length under 20.
      Open

              $completeFallBackThemePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $fallBackThemePath);
      Severity: Minor
      Found in include/runtime/Theme.php by phpmd

      LongVariable

      Since: 0.2

      Detects when a field, formal or local variable is declared with a long name.

      Example

      class Something {
          protected $reallyLongIntName = -3; // VIOLATION - Field
          public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
              $otherReallyLongName = -5; // VIOLATION - Local
              for ($interestingIntIndex = 0; // VIOLATION - For
                   $interestingIntIndex < 10;
                   $interestingIntIndex++ ) {
              }
          }
      }

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

      Avoid excessively long variable names like $completeFallBackThemePath. Keep variable name length under 20.
      Open

                  $completeFallBackThemePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $fallbackPath);
      Severity: Minor
      Found in include/runtime/Theme.php by phpmd

      LongVariable

      Since: 0.2

      Detects when a field, formal or local variable is declared with a long name.

      Example

      class Something {
          protected $reallyLongIntName = -3; // VIOLATION - Field
          public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
              $otherReallyLongName = -5; // VIOLATION - Local
              for ($interestingIntIndex = 0; // VIOLATION - For
                   $interestingIntIndex < 10;
                   $interestingIntIndex++ ) {
              }
          }
      }

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

      Avoid excessively long variable names like $completeSelectedThemePath. Keep variable name length under 20.
      Open

              $completeSelectedThemePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $selectedThemePath);
      Severity: Minor
      Found in include/runtime/Theme.php by phpmd

      LongVariable

      Since: 0.2

      Detects when a field, formal or local variable is declared with a long name.

      Example

      class Something {
          protected $reallyLongIntName = -3; // VIOLATION - Field
          public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
              $otherReallyLongName = -5; // VIOLATION - Local
              for ($interestingIntIndex = 0; // VIOLATION - For
                   $interestingIntIndex < 10;
                   $interestingIntIndex++ ) {
              }
          }
      }

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

      Avoid excessively long variable names like $completeFallBackThemePath. Keep variable name length under 20.
      Open

              $completeFallBackThemePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $fallbackPath);
      Severity: Minor
      Found in include/runtime/Theme.php by phpmd

      LongVariable

      Since: 0.2

      Detects when a field, formal or local variable is declared with a long name.

      Example

      class Something {
          protected $reallyLongIntName = -3; // VIOLATION - Field
          public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
              $otherReallyLongName = -5; // VIOLATION - Local
              for ($interestingIntIndex = 0; // VIOLATION - For
                   $interestingIntIndex < 10;
                   $interestingIntIndex++ ) {
              }
          }
      }

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

      Each class must be in a namespace of at least one level (a top-level vendor name)
      Open

      class Vtiger_Theme extends Vtiger_Viewer
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

      The class Vtiger_Theme is not named in CamelCase.
      Open

      class Vtiger_Theme extends Vtiger_Viewer
      {
          /**
           * Function to get the path of a given style sheet or default style sheet.
           *
      Severity: Minor
      Found in include/runtime/Theme.php by phpmd

      CamelCaseClassName

      Since: 0.2

      It is considered best practice to use the CamelCase notation to name classes.

      Example

      class class_name {
      }

      Source

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

           * Function to get the path of a given style sheet or default style sheet.
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           */
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              return false;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  return $basePath . $imageFilePath;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           *
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              $imageFilePath = 'layouts/' . self::getLayoutName() . '/images/' . $imageFileName;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                      return $basePath . $fallbackPath;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              if (file_exists($completeSelectedThemePath)) {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  return $fallBackThemePath;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           *
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           */
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          /**
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              if (file_exists($completeImageFilePath)) {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           *
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                      return $basePath . $imageFilePath;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  $imageFilePath = self::getThemePath() . '/' . 'images' . '/' . $defaultFileName . $type;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  $fallbackPath = self::getBaseThemePath() . '/' . 'images' . '/' . $defaultFileName . $type;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * @return string - theme folder
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          public static function getBaseStylePath()
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * This checks image in selected theme if not in images folder if it doest nor exists either case will retutn false.
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  return $basePath . $imageFilePath;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  if (file_exists($completeFallBackThemePath)) {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              $completeSelectedThemePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $selectedThemePath);
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  return $selectedThemePath;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * @return string - Default theme name
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * Function to returns all skins(themes).
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          public static function getAllSkins()
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           *
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              $completeImageFilePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $imageFilePath);
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              return false;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * @param string $imageFileName   - file name
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  $imageFilePath = self::getThemePath() . '/' . 'images' . '/' . $imageFileName . $type;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              $fallBackThemePath = self::getBaseThemePath() . '/' . self::getDefaultThemeName();
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          public static function getThemeStyle()
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * @return <string/boolean> - returns file path if exists or false;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  return $basePath . $fallbackPath;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          public static function getOrignOrDefaultImgPath($imageFileName, $defaultFileName)
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              if (!IS_PUBLIC_DIR) {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  $completeImageFilePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $imageFilePath);
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              foreach ($allowedImgTypes as $type) {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              return false;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           */
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * @param mixed $theme
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * if there's no image with a default name it will return false.
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           */
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              foreach ($allowedImgTypes as $type) {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           */
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              return false;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           *
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              $filePath = self::getThemePath() . '/' . 'style.css';
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * This function searches for an image, it takes a default name in case it's missing,
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           *
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              return $baseLayoutPath . '/' . $themeName;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          /**
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  return $filePath;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              $basePath = '';
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  if (file_exists($completeFallBackThemePath)) {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          /**
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * Function to get the selected theme folder path.
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              if (empty($theme)) {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  $theme = self::getDefaultThemeName();
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              if (file_exists($completeFallBackThemePath)) {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * Function to get the image path
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          public static function getImagePath($imageFileName)
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              $basePath = '';
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              $imageFilePath = self::getThemePath() . '/images/' . $imageFileName;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          /**
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * @return <string/boolean> - returns file path if exists or false;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * @return string -  selected theme path
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          /**
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * Function returns the current users skin(theme) path.
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           *
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  if (file_exists($completeImageFilePath)) {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              return 'layouts/' . self::getLayoutName() . '/skins';
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           *
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              $completeFallBackThemePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $fallBackThemePath);
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              $theme = \App\User::getCurrentUserModel()->getDetail('theme');
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * @return <string / Boolean> - file path , false if not exists
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           */
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              if (!IS_PUBLIC_DIR) {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              $completeImageFilePath = Vtiger_Loader::resolveNameToPath('~' . 'public_html/' . $imageFilePath);
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              if (file_exists($completeFallBackThemePath)) {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * Function to get the image path or get defaulf
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  $completeImageFilePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $imageFilePath);
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                      return $basePath . $imageFilePath;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  $completeFallBackThemePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $fallbackPath);
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * Function to get the Base Theme Path, until theme folder not selected theme folder.
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           */
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              // Exception should be thrown???
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * @param string $imageFileName - file name with extension
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  $basePath = 'public_html/';
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              return 'layouts/' . self::getLayoutName() . '/styles/Main.css';
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          public static function getThemePath($theme = '')
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           */
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          /**
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              $selectedThemePath = self::getBaseThemePath() . '/' . $theme;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          public static function getCurrentUserThemePath()
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              $themeName = self::getDefaultThemeName();
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              $completeFilePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $filePath);
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              if (file_exists($completeFilePath)) {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  $basePath = 'public_html/';
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              $allowedImgTypes = ['.gif', '.jpg', '.png'];
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  $fallbackPath = self::getBaseThemePath() . '/' . 'images' . '/' . $imageFileName . $type;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                      return $basePath . $fallbackPath;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           *
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * Function to get the default theme name.
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * @return <Array>
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              if (file_exists($completeImageFilePath)) {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           * @param string $defaultFileName - file name
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  $completeFallBackThemePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $fallbackPath);
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          public static function getBaseThemePath()
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          /**
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          /**
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          public static function getDefaultThemeName()
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              return empty($theme) ? self::DEFAULTTHEME : $theme;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           */
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              $fallbackPath = self::getBaseThemePath() . '/images/' . $imageFileName;
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              $completeFallBackThemePath = Vtiger_Loader::resolveNameToPath('~public_html/' . $fallbackPath);
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              }
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

                  if (file_exists($completeImageFilePath)) {
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

          /**
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           *  * @return string -  path to base style
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

           *
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              return Vtiger_Util_Helper::getAllSkins();
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

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

              $baseLayoutPath = self::getBaseThemePath();
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

      Class name "Vtiger_Theme" is not in camel caps format
      Open

      class Vtiger_Theme extends Vtiger_Viewer
      Severity: Minor
      Found in include/runtime/Theme.php by phpcodesniffer

      There are no issues that match your filters.

      Category
      Status