XoopsModules25x/xoopstube

View on GitHub
class/Thumbnails.php

Summary

Maintainability
C
1 day
Test Coverage

resizeThumbnail accesses the super-global variable $GLOBALS.
Open

    public function resizeThumbnail()
    {
        // Get image size and scale ratio
        $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
        // If the image is larger than the max shrink it
Severity: Minor
Found in class/Thumbnails.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

resizeThumbnail accesses the super-global variable $GLOBALS.
Open

    public function resizeThumbnail()
    {
        // Get image size and scale ratio
        $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
        // If the image is larger than the max shrink it
Severity: Minor
Found in class/Thumbnails.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

resizeThumbnail accesses the super-global variable $GLOBALS.
Open

    public function resizeThumbnail()
    {
        // Get image size and scale ratio
        $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
        // If the image is larger than the max shrink it
Severity: Minor
Found in class/Thumbnails.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

The class Thumbnails has an overall complexity of 67 which is very high. The configured complexity threshold is 50.
Open

class Thumbnails
{
    public $_imgName      = 'blank.gif';
    public $_img_path     = 'uploads';
    public $_img_savepath = 'thumbs';
Severity: Minor
Found in class/Thumbnails.php by phpmd

Method resizeThumbnail has 75 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function resizeThumbnail()
    {
        // Get image size and scale ratio
        $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
        // If the image is larger than the max shrink it
Severity: Major
Found in class/Thumbnails.php - About 3 hrs to fix

    Function resizeThumbnail has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
    Open

        public function resizeThumbnail()
        {
            // Get image size and scale ratio
            $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
            // If the image is larger than the max shrink it
    Severity: Minor
    Found in class/Thumbnails.php - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    The class Thumbnails has 17 fields. Consider redesigning Thumbnails to keep the number of fields under 15.
    Open

    class Thumbnails
    {
        public $_imgName      = 'blank.gif';
        public $_img_path     = 'uploads';
        public $_img_savepath = 'thumbs';
    Severity: Minor
    Found in class/Thumbnails.php by phpmd

    TooManyFields

    Since: 0.1

    Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

    Example

    class Person {
       protected $one;
       private $two;
       private $three;
       [... many more fields ...]
    }

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

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

        public function createThumbnail(
            $img_width = null,
            $img_height = null,
            $img_quality = null,
            $img_update = null,
    Severity: Minor
    Found in class/Thumbnails.php - About 1 hr to fix

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

          public function createThumbnail(
              $img_width = null,
              $img_height = null,
              $img_quality = null,
              $img_update = null,
      Severity: Minor
      Found in class/Thumbnails.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

      Function __construct has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          public function __construct($img_name = null, $img_path = null, $img_savepath = null)
          {
              if (!\preg_match('/\.(jpg|gif|png|jpeg)$/i', $img_name)) {
                  return false;
              }
      Severity: Minor
      Found in class/Thumbnails.php - About 45 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

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

              $img_width = null,
              $img_height = null,
              $img_quality = null,
              $img_update = null,
              $img_aspect = null
      Severity: Minor
      Found in class/Thumbnails.php - About 35 mins to fix

        Avoid too many return statements within this method.
        Open

                return false === $image ? DEFAULT_PATH : $image;
        Severity: Major
        Found in class/Thumbnails.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return "{$this->_img_savepath}/{$savefile}";
          Severity: Major
          Found in class/Thumbnails.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                                return $this->_source_url . "/{$this->_img_savepath}/{$savefile}";
            Severity: Major
            Found in class/Thumbnails.php - About 30 mins to fix

              The method createThumbnail() has an NPath complexity of 7776. The configured NPath complexity threshold is 200.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.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 resizeThumbnail() has an NPath complexity of 8928. The configured NPath complexity threshold is 200.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.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 resizeThumbnail() has a Cyclomatic Complexity of 26. The configured cyclomatic complexity threshold is 10.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.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 createThumbnail() has a Cyclomatic Complexity of 16. The configured cyclomatic complexity threshold is 10.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.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

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

                      $this->_img_info = \getimagesize($this->_source_image, $imageinfo);
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              UnusedLocalVariable

              Since: 0.2

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

              Example

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

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

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

                                      $src_file_im = '"' . $cur_dir . '\\' . \str_replace('/', '\\', $this->_source_image) . '"';
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              UnusedLocalVariable

              Since: 0.2

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

              Example

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

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

              Avoid assigning values to variables in if clauses and the like (line '353', column '23').
              Open

                  public function checkGdLibrary()
                  {
                      if (!\extension_loaded('gd')) {
                          return false;
                      }
              Severity: Minor
              Found in class/Thumbnails.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 resizeThumbnail uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
              Open

                                      } else {
                                          \imagepng($tmp_img, $this->_save_image);
                                      }
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              ElseExpression

              Since: 1.4.0

              An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

              Example

              class Foo
              {
                  public function bar($flag)
                  {
                      if ($flag) {
                          // one branch
                      } else {
                          // another branch
                      }
                  }
              }

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

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

                                  } else {
                                      $src_file_im = \escapeshellarg($this->_source_image);
                                      $new_file_im = \escapeshellarg($this->_save_image);
                                  }
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              ElseExpression

              Since: 1.4.0

              An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

              Example

              class Foo
              {
                  public function bar($flag)
                  {
                      if ($flag) {
                          // one branch
                      } else {
                          // another branch
                      }
                  }
              }

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

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

                                      } else {
                                          \imagepng($tmp_img, $this->_save_image);
                                      }
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              ElseExpression

              Since: 1.4.0

              An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

              Example

              class Foo
              {
                  public function bar($flag)
                  {
                      if ($flag) {
                          // one branch
                      } else {
                          // another branch
                      }
                  }
              }

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

              The property $_imgName is not named in camelCase.
              Open

              class Thumbnails
              {
                  public $_imgName      = 'blank.gif';
                  public $_img_path     = 'uploads';
                  public $_img_savepath = 'thumbs';
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCasePropertyName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name attributes.

              Example

              class ClassName {
                  protected $property_name;
              }

              Source

              The property $img_update is not named in camelCase.
              Open

              class Thumbnails
              {
                  public $_imgName      = 'blank.gif';
                  public $_img_path     = 'uploads';
                  public $_img_savepath = 'thumbs';
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCasePropertyName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name attributes.

              Example

              class ClassName {
                  protected $property_name;
              }

              Source

              The parameter $img_quality is not named in camelCase.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseParameterName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name parameters.

              Example

              class ClassName {
                  public function doSomething($user_name) {
                  }
              }

              Source

              The property $_save_path is not named in camelCase.
              Open

              class Thumbnails
              {
                  public $_imgName      = 'blank.gif';
                  public $_img_path     = 'uploads';
                  public $_img_savepath = 'thumbs';
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCasePropertyName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name attributes.

              Example

              class ClassName {
                  protected $property_name;
              }

              Source

              The parameter $img_path is not named in camelCase.
              Open

                  public function __construct($img_name = null, $img_path = null, $img_savepath = null)
                  {
                      if (!\preg_match('/\.(jpg|gif|png|jpeg)$/i', $img_name)) {
                          return false;
                      }
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseParameterName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name parameters.

              Example

              class ClassName {
                  public function doSomething($user_name) {
                  }
              }

              Source

              The property $_img_path is not named in camelCase.
              Open

              class Thumbnails
              {
                  public $_imgName      = 'blank.gif';
                  public $_img_path     = 'uploads';
                  public $_img_savepath = 'thumbs';
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCasePropertyName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name attributes.

              Example

              class ClassName {
                  protected $property_name;
              }

              Source

              The property $img_height is not named in camelCase.
              Open

              class Thumbnails
              {
                  public $_imgName      = 'blank.gif';
                  public $_img_path     = 'uploads';
                  public $_img_savepath = 'thumbs';
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCasePropertyName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name attributes.

              Example

              class ClassName {
                  protected $property_name;
              }

              Source

              The property $_return_fullpath is not named in camelCase.
              Open

              class Thumbnails
              {
                  public $_imgName      = 'blank.gif';
                  public $_img_path     = 'uploads';
                  public $_img_savepath = 'thumbs';
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCasePropertyName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name attributes.

              Example

              class ClassName {
                  protected $property_name;
              }

              Source

              The property $img_quality is not named in camelCase.
              Open

              class Thumbnails
              {
                  public $_imgName      = 'blank.gif';
                  public $_img_path     = 'uploads';
                  public $_img_savepath = 'thumbs';
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCasePropertyName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name attributes.

              Example

              class ClassName {
                  protected $property_name;
              }

              Source

              The property $img_aspect is not named in camelCase.
              Open

              class Thumbnails
              {
                  public $_imgName      = 'blank.gif';
                  public $_img_path     = 'uploads';
                  public $_img_savepath = 'thumbs';
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCasePropertyName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name attributes.

              Example

              class ClassName {
                  protected $property_name;
              }

              Source

              The parameter $img_savepath is not named in camelCase.
              Open

                  public function __construct($img_name = null, $img_path = null, $img_savepath = null)
                  {
                      if (!\preg_match('/\.(jpg|gif|png|jpeg)$/i', $img_name)) {
                          return false;
                      }
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseParameterName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name parameters.

              Example

              class ClassName {
                  public function doSomething($user_name) {
                  }
              }

              Source

              The property $_save_image is not named in camelCase.
              Open

              class Thumbnails
              {
                  public $_imgName      = 'blank.gif';
                  public $_img_path     = 'uploads';
                  public $_img_savepath = 'thumbs';
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCasePropertyName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name attributes.

              Example

              class ClassName {
                  protected $property_name;
              }

              Source

              The property $_img_savepath is not named in camelCase.
              Open

              class Thumbnails
              {
                  public $_imgName      = 'blank.gif';
                  public $_img_path     = 'uploads';
                  public $_img_savepath = 'thumbs';
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCasePropertyName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name attributes.

              Example

              class ClassName {
                  protected $property_name;
              }

              Source

              The property $_source_url is not named in camelCase.
              Open

              class Thumbnails
              {
                  public $_imgName      = 'blank.gif';
                  public $_img_path     = 'uploads';
                  public $_img_savepath = 'thumbs';
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCasePropertyName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name attributes.

              Example

              class ClassName {
                  protected $property_name;
              }

              Source

              The property $_source_image is not named in camelCase.
              Open

              class Thumbnails
              {
                  public $_imgName      = 'blank.gif';
                  public $_img_path     = 'uploads';
                  public $_img_savepath = 'thumbs';
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCasePropertyName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name attributes.

              Example

              class ClassName {
                  protected $property_name;
              }

              Source

              The parameter $img_width is not named in camelCase.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseParameterName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name parameters.

              Example

              class ClassName {
                  public function doSomething($user_name) {
                  }
              }

              Source

              The parameter $img_aspect is not named in camelCase.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseParameterName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name parameters.

              Example

              class ClassName {
                  public function doSomething($user_name) {
                  }
              }

              Source

              The parameter $img_update is not named in camelCase.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseParameterName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name parameters.

              Example

              class ClassName {
                  public function doSomething($user_name) {
                  }
              }

              Source

              The property $_img_info is not named in camelCase.
              Open

              class Thumbnails
              {
                  public $_imgName      = 'blank.gif';
                  public $_img_path     = 'uploads';
                  public $_img_savepath = 'thumbs';
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCasePropertyName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name attributes.

              Example

              class ClassName {
                  protected $property_name;
              }

              Source

              The property $_source_path is not named in camelCase.
              Open

              class Thumbnails
              {
                  public $_imgName      = 'blank.gif';
                  public $_img_path     = 'uploads';
                  public $_img_savepath = 'thumbs';
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCasePropertyName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name attributes.

              Example

              class ClassName {
                  protected $property_name;
              }

              Source

              The property $img_width is not named in camelCase.
              Open

              class Thumbnails
              {
                  public $_imgName      = 'blank.gif';
                  public $_img_path     = 'uploads';
                  public $_img_savepath = 'thumbs';
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCasePropertyName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name attributes.

              Example

              class ClassName {
                  protected $property_name;
              }

              Source

              The property $_image_type is not named in camelCase.
              Open

              class Thumbnails
              {
                  public $_imgName      = 'blank.gif';
                  public $_img_path     = 'uploads';
                  public $_img_savepath = 'thumbs';
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCasePropertyName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name attributes.

              Example

              class ClassName {
                  protected $property_name;
              }

              Source

              The parameter $img_height is not named in camelCase.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseParameterName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name parameters.

              Example

              class ClassName {
                  public function doSomething($user_name) {
                  }
              }

              Source

              The property $_usethumbs is not named in camelCase.
              Open

              class Thumbnails
              {
                  public $_imgName      = 'blank.gif';
                  public $_img_path     = 'uploads';
                  public $_img_savepath = 'thumbs';
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCasePropertyName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name attributes.

              Example

              class ClassName {
                  protected $property_name;
              }

              Source

              The parameter $img_name is not named in camelCase.
              Open

                  public function __construct($img_name = null, $img_path = null, $img_savepath = null)
                  {
                      if (!\preg_match('/\.(jpg|gif|png|jpeg)$/i', $img_name)) {
                          return false;
                      }
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseParameterName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name parameters.

              Example

              class ClassName {
                  public function doSomething($user_name) {
                  }
              }

              Source

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

              <?php
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Property name "$_source_image" should not be prefixed with an underscore to indicate visibility
              Open

                  public $_source_image = '';
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              The DEFAULT body must start on the line following the statement
              Open

                          default:
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Property name "$_img_savepath" should not be prefixed with an underscore to indicate visibility
              Open

                  public $_img_savepath = 'thumbs';
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Property name "$_img_info" should not be prefixed with an underscore to indicate visibility
              Open

                  public $_img_info = [];
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Property name "$_imgName" should not be prefixed with an underscore to indicate visibility
              Open

                  public $_imgName      = 'blank.gif';
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Property name "$_save_image" should not be prefixed with an underscore to indicate visibility
              Open

                  public $_save_image   = '';
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Property name "$_return_fullpath" should not be prefixed with an underscore to indicate visibility
              Open

                  public $_return_fullpath = 0;
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Property name "$_source_path" should not be prefixed with an underscore to indicate visibility
              Open

                  public $_source_path  = '';
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Property name "$_usethumbs" should not be prefixed with an underscore to indicate visibility
              Open

                  public $_usethumbs       = 0;
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Property name "$_img_path" should not be prefixed with an underscore to indicate visibility
              Open

                  public $_img_path     = 'uploads';
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Property name "$_image_type" should not be prefixed with an underscore to indicate visibility
              Open

                  public $_image_type      = 'gd2';
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Property name "$_source_url" should not be prefixed with an underscore to indicate visibility
              Open

                  public $_source_url   = '';
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Property name "$_save_path" should not be prefixed with an underscore to indicate visibility
              Open

                  public $_save_path    = '';
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Line exceeds 120 characters; contains 132 characters
              Open

                              if (!empty($GLOBALS['xoopsModuleConfig']['path_magick']) && \is_dir($GLOBALS['xoopsModuleConfig']['path_magick'])) {
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Line exceeds 120 characters; contains 155 characters
              Open

                              $imageCreateFunction = (\function_exists('imagecreatetruecolor') && 'gd2' === $this->_image_type) ? 'imagecreatetruecolor' : 'imagecreate';
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Line exceeds 120 characters; contains 162 characters
              Open

                                      $img     = \function_exists('imagecreatefromgif') ? \imagecreatefromgif($this->_source_image) : \imagecreatefrompng($this->_source_image);
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Line exceeds 120 characters; contains 148 characters
              Open

                          return 1 == $this->_return_fullpath ? $this->_source_url . "/{$this->_img_savepath}/{$savefile}" : "{$this->_img_savepath}/{$savefile}";
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Line exceeds 120 characters; contains 136 characters
              Open

                                      $imageCopyfunction($tmp_img, $img, 0, 0, 0, 0, $newWidth, $newHeight, $this->_img_info[0], $this->_img_info[1]);
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Line exceeds 120 characters; contains 284 characters
              Open

                                  $magick_command = $GLOBALS['xoopsModuleConfig']['path_magick'] . '/convert -auto-orient -quality {$GLOBALS["xoopsModuleConfig"]["imagequality"]} -antialias -sample {$newWidth}x{$newHeight} {$src_file_im} +profile "*" ' . \str_replace('\\', '/', $new_file_im) . '';
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Line exceeds 120 characters; contains 164 characters
              Open

                                      $img     = \function_exists('imagecreatefromjpeg') ? \imagecreatefromjpeg($this->_source_image) : \imagecreatefrompng($this->_source_image);
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Line exceeds 120 characters; contains 136 characters
              Open

                                      $imageCopyfunction($tmp_img, $img, 0, 0, 0, 0, $newWidth, $newHeight, $this->_img_info[0], $this->_img_info[1]);
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Line exceeds 120 characters; contains 136 characters
              Open

                                      $imageCopyfunction($tmp_img, $img, 0, 0, 0, 0, $newWidth, $newHeight, $this->_img_info[0], $this->_img_info[1]);
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              Line exceeds 120 characters; contains 156 characters
              Open

                              $imageCopyfunction   = (\function_exists('ImageCopyResampled') && 'gd2' === $this->_image_type) ? 'imagecopyresampled' : 'imagecopyresized';
              Severity: Minor
              Found in class/Thumbnails.php by phpcodesniffer

              The variable $img_height is not named in camelCase.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_update is not named in camelCase.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_savepath is not named in camelCase.
              Open

                  public function __construct($img_name = null, $img_path = null, $img_savepath = null)
                  {
                      if (!\preg_match('/\.(jpg|gif|png|jpeg)$/i', $img_name)) {
                          return false;
                      }
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_height is not named in camelCase.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_update is not named in camelCase.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_name is not named in camelCase.
              Open

                  public function __construct($img_name = null, $img_path = null, $img_savepath = null)
                  {
                      if (!\preg_match('/\.(jpg|gif|png|jpeg)$/i', $img_name)) {
                          return false;
                      }
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_path is not named in camelCase.
              Open

                  public function __construct($img_name = null, $img_path = null, $img_savepath = null)
                  {
                      if (!\preg_match('/\.(jpg|gif|png|jpeg)$/i', $img_name)) {
                          return false;
                      }
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_aspect is not named in camelCase.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_name is not named in camelCase.
              Open

                  public function __construct($img_name = null, $img_path = null, $img_savepath = null)
                  {
                      if (!\preg_match('/\.(jpg|gif|png|jpeg)$/i', $img_name)) {
                          return false;
                      }
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_width is not named in camelCase.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $path_to_check is not named in camelCase.
              Open

                  public function __construct($img_name = null, $img_path = null, $img_savepath = null)
                  {
                      if (!\preg_match('/\.(jpg|gif|png|jpeg)$/i', $img_name)) {
                          return false;
                      }
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_width is not named in camelCase.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_quality is not named in camelCase.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $path_to_check is not named in camelCase.
              Open

                  public function __construct($img_name = null, $img_path = null, $img_savepath = null)
                  {
                      if (!\preg_match('/\.(jpg|gif|png|jpeg)$/i', $img_name)) {
                          return false;
                      }
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_update is not named in camelCase.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_quality is not named in camelCase.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_savepath is not named in camelCase.
              Open

                  public function __construct($img_name = null, $img_path = null, $img_savepath = null)
                  {
                      if (!\preg_match('/\.(jpg|gif|png|jpeg)$/i', $img_name)) {
                          return false;
                      }
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $path_to_check is not named in camelCase.
              Open

                  public function __construct($img_name = null, $img_path = null, $img_savepath = null)
                  {
                      if (!\preg_match('/\.(jpg|gif|png|jpeg)$/i', $img_name)) {
                          return false;
                      }
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_width is not named in camelCase.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_height is not named in camelCase.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_path is not named in camelCase.
              Open

                  public function __construct($img_name = null, $img_path = null, $img_savepath = null)
                  {
                      if (!\preg_match('/\.(jpg|gif|png|jpeg)$/i', $img_name)) {
                          return false;
                      }
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $path_to_check is not named in camelCase.
              Open

                  public function __construct($img_name = null, $img_path = null, $img_savepath = null)
                  {
                      if (!\preg_match('/\.(jpg|gif|png|jpeg)$/i', $img_name)) {
                          return false;
                      }
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_path is not named in camelCase.
              Open

                  public function __construct($img_name = null, $img_path = null, $img_savepath = null)
                  {
                      if (!\preg_match('/\.(jpg|gif|png|jpeg)$/i', $img_name)) {
                          return false;
                      }
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_name is not named in camelCase.
              Open

                  public function __construct($img_name = null, $img_path = null, $img_savepath = null)
                  {
                      if (!\preg_match('/\.(jpg|gif|png|jpeg)$/i', $img_name)) {
                          return false;
                      }
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_quality is not named in camelCase.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_aspect is not named in camelCase.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_aspect is not named in camelCase.
              Open

                  public function createThumbnail(
                      $img_width = null,
                      $img_height = null,
                      $img_quality = null,
                      $img_update = null,
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $img_savepath is not named in camelCase.
              Open

                  public function __construct($img_name = null, $img_path = null, $img_savepath = null)
                  {
                      if (!\preg_match('/\.(jpg|gif|png|jpeg)$/i', $img_name)) {
                          return false;
                      }
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $tmp_img is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $src_file_im is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $tmp_img is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $tmp_img is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $tmp_img is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $cur_dir is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $new_file_im is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $new_file_im is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $tmp_img is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $tmp_img is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $tmp_img is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $tmp_img is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $magick_command is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $new_file_im is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $tmp_img is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $magick_command is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $tmp_img is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $cur_dir is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $src_file_im is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $tmp_img is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $cur_dir is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $tmp_img is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $tmp_img is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              The variable $tmp_img is not named in camelCase.
              Open

                  public function resizeThumbnail()
                  {
                      // Get image size and scale ratio
                      $scale = \min($this->img_width / $this->_img_info[0], $this->img_height / $this->_img_info[1]);
                      // If the image is larger than the max shrink it
              Severity: Minor
              Found in class/Thumbnails.php by phpmd

              CamelCaseVariableName

              Since: 0.2

              It is considered best practice to use the camelCase notation to name variables.

              Example

              class ClassName {
                  public function doSomething() {
                      $data_module = new DataModule();
                  }
              }

              Source

              There are no issues that match your filters.

              Category
              Status