mambax7/publisher

View on GitHub
thumb.php

Summary

Maintainability
F
1 wk
Test Coverage

getLocalImagePath accesses the super-global variable $_SERVER.
Open

    protected function getLocalImagePath($src)
    {
        $src = ltrim($src, '/'); //strip off the leading '/'
        if (!$this->docRoot) {
            $this->debug(3, 'We have no document root set, so as a last resort, lets check if the image is in the current dir and serve that.');
Severity: Minor
Found in thumb.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

calcDocRoot accesses the super-global variable $_SERVER.
Open

    protected function calcDocRoot()
    {
        $docRoot = @$_SERVER['DOCUMENT_ROOT'];
        if (defined('LOCAL_FILE_BASE_DIRECTORY')) {
            $docRoot = LOCAL_FILE_BASE_DIRECTORY;
Severity: Minor
Found in thumb.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

calcDocRoot accesses the super-global variable $_SERVER.
Open

    protected function calcDocRoot()
    {
        $docRoot = @$_SERVER['DOCUMENT_ROOT'];
        if (defined('LOCAL_FILE_BASE_DIRECTORY')) {
            $docRoot = LOCAL_FILE_BASE_DIRECTORY;
Severity: Minor
Found in thumb.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

calcDocRoot accesses the super-global variable $_SERVER.
Open

    protected function calcDocRoot()
    {
        $docRoot = @$_SERVER['DOCUMENT_ROOT'];
        if (defined('LOCAL_FILE_BASE_DIRECTORY')) {
            $docRoot = LOCAL_FILE_BASE_DIRECTORY;
Severity: Minor
Found in thumb.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

__construct accesses the super-global variable $_SERVER.
Open

    public function __construct()
    {
        global $allowedSites;
        $this->startTime = microtime(true);
        date_default_timezone_set('UTC');
Severity: Minor
Found in thumb.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

getLocalImagePath accesses the super-global variable $_SERVER.
Open

    protected function getLocalImagePath($src)
    {
        $src = ltrim($src, '/'); //strip off the leading '/'
        if (!$this->docRoot) {
            $this->debug(3, 'We have no document root set, so as a last resort, lets check if the image is in the current dir and serve that.');
Severity: Minor
Found in thumb.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

serveErrors accesses the super-global variable $_SERVER.
Open

    protected function serveErrors()
    {
        header($_SERVER['SERVER_PROTOCOL'] . ' 400 Bad Request');
        if (!DISPLAY_ERROR_MESSAGES) {
            return;
Severity: Minor
Found in thumb.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

tryBrowserCache accesses the super-global variable $_SERVER.
Open

    protected function tryBrowserCache()
    {
        if (BROWSER_CACHE_DISABLE) {
            $this->debug(3, 'Browser caching is disabled');

Severity: Minor
Found in thumb.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

calcDocRoot accesses the super-global variable $_SERVER.
Open

    protected function calcDocRoot()
    {
        $docRoot = @$_SERVER['DOCUMENT_ROOT'];
        if (defined('LOCAL_FILE_BASE_DIRECTORY')) {
            $docRoot = LOCAL_FILE_BASE_DIRECTORY;
Severity: Minor
Found in thumb.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

getIP accesses the super-global variable $_SERVER.
Open

    protected function getIP()
    {
        $rem = @$_SERVER['REMOTE_ADDR'];
        $ff  = @$_SERVER['HTTP_X_FORWARDED_FOR'];
        $ci  = @$_SERVER['HTTP_CLIENT_IP'];
Severity: Minor
Found in thumb.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

serveErrors accesses the super-global variable $_SERVER.
Open

    protected function serveErrors()
    {
        header($_SERVER['SERVER_PROTOCOL'] . ' 400 Bad Request');
        if (!DISPLAY_ERROR_MESSAGES) {
            return;
Severity: Minor
Found in thumb.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

__construct accesses the super-global variable $_SERVER.
Open

    public function __construct()
    {
        global $allowedSites;
        $this->startTime = microtime(true);
        date_default_timezone_set('UTC');
Severity: Minor
Found in thumb.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

getIP accesses the super-global variable $_SERVER.
Open

    protected function getIP()
    {
        $rem = @$_SERVER['REMOTE_ADDR'];
        $ff  = @$_SERVER['HTTP_X_FORWARDED_FOR'];
        $ci  = @$_SERVER['HTTP_CLIENT_IP'];
Severity: Minor
Found in thumb.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

tryBrowserCache accesses the super-global variable $_SERVER.
Open

    protected function tryBrowserCache()
    {
        if (BROWSER_CACHE_DISABLE) {
            $this->debug(3, 'Browser caching is disabled');

Severity: Minor
Found in thumb.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

__construct accesses the super-global variable $_SERVER.
Open

    public function __construct()
    {
        global $allowedSites;
        $this->startTime = microtime(true);
        date_default_timezone_set('UTC');
Severity: Minor
Found in thumb.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

param accesses the super-global variable $_GET.
Open

    protected function param($property, $default = '')
    {
        if (isset($_GET[$property])) {
            return Request::getString($property, '', 'GET');
        }
Severity: Minor
Found in thumb.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

calcDocRoot accesses the super-global variable $_SERVER.
Open

    protected function calcDocRoot()
    {
        $docRoot = @$_SERVER['DOCUMENT_ROOT'];
        if (defined('LOCAL_FILE_BASE_DIRECTORY')) {
            $docRoot = LOCAL_FILE_BASE_DIRECTORY;
Severity: Minor
Found in thumb.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

getLocalImagePath accesses the super-global variable $_SERVER.
Open

    protected function getLocalImagePath($src)
    {
        $src = ltrim($src, '/'); //strip off the leading '/'
        if (!$this->docRoot) {
            $this->debug(3, 'We have no document root set, so as a last resort, lets check if the image is in the current dir and serve that.');
Severity: Minor
Found in thumb.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

calcDocRoot accesses the super-global variable $_SERVER.
Open

    protected function calcDocRoot()
    {
        $docRoot = @$_SERVER['DOCUMENT_ROOT'];
        if (defined('LOCAL_FILE_BASE_DIRECTORY')) {
            $docRoot = LOCAL_FILE_BASE_DIRECTORY;
Severity: Minor
Found in thumb.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

getIP accesses the super-global variable $_SERVER.
Open

    protected function getIP()
    {
        $rem = @$_SERVER['REMOTE_ADDR'];
        $ff  = @$_SERVER['HTTP_X_FORWARDED_FOR'];
        $ci  = @$_SERVER['HTTP_CLIENT_IP'];
Severity: Minor
Found in thumb.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

File thumb.php has 1191 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

declare(strict_types=1);
/**
 * TimThumb by Ben Gillbanks and Mark Maunder
Severity: Major
Found in thumb.php - About 3 days to fix

    Function processImageAndWriteToCache has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring.
    Open

        protected function processImageAndWriteToCache($localImage)
        {
            $sData    = getimagesize($localImage);
            $origType = $sData[2];
            $mimeType = $sData['mime'];
    Severity: Minor
    Found in thumb.php - About 1 day to fix

    Cognitive Complexity

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

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

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

    Further reading

    Method processImageAndWriteToCache has 248 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function processImageAndWriteToCache($localImage)
        {
            $sData    = getimagesize($localImage);
            $origType = $sData[2];
            $mimeType = $sData['mime'];
    Severity: Major
    Found in thumb.php - About 1 day to fix

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

          public function __construct()
          {
              global $allowedSites;
              $this->startTime = microtime(true);
              date_default_timezone_set('UTC');
      Severity: Minor
      Found in thumb.php - About 5 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

      Timthumb has 35 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class Timthumb
      {
          protected        $src                      = '';
          protected        $is404                    = false;
          protected        $docRoot                  = '';
      Severity: Minor
      Found in thumb.php - About 4 hrs to fix

        Method __construct has 89 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function __construct()
            {
                global $allowedSites;
                $this->startTime = microtime(true);
                date_default_timezone_set('UTC');
        Severity: Major
        Found in thumb.php - About 3 hrs to fix

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

          class Timthumb
          {
              protected        $src                      = '';
              protected        $is404                    = false;
              protected        $docRoot                  = '';
          Severity: Minor
          Found in thumb.php by phpmd

          The class Timthumb has 28 non-getter- and setter-methods. Consider refactoring Timthumb to keep number of methods under 25.
          Open

          class Timthumb
          {
              protected        $src                      = '';
              protected        $is404                    = false;
              protected        $docRoot                  = '';
          Severity: Minor
          Found in thumb.php by phpmd

          TooManyMethods

          Since: 0.1

          A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

          By default it ignores methods starting with 'get' or 'set'.

          The default was changed from 10 to 25 in PHPMD 2.3.

          Example

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

          Function getLocalImagePath has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
          Open

              protected function getLocalImagePath($src)
              {
                  $src = ltrim($src, '/'); //strip off the leading '/'
                  if (!$this->docRoot) {
                      $this->debug(3, 'We have no document root set, so as a last resort, lets check if the image is in the current dir and serve that.');
          Severity: Minor
          Found in thumb.php - About 2 hrs to fix

          Cognitive Complexity

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

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

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

          Further reading

          Method getURL has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function getURL($url, $tempfile)
              {
                  $this->lastURLError = false;
                  $url                = preg_replace('/ /', '%20', $url);
                  if (function_exists('curl_init')) {
          Severity: Major
          Found in thumb.php - About 2 hrs to fix

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

                protected function getURL($url, $tempfile)
                {
                    $this->lastURLError = false;
                    $url                = preg_replace('/ /', '%20', $url);
                    if (function_exists('curl_init')) {
            Severity: Minor
            Found in thumb.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

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

                protected function cleanCache()
                {
                    if (FILE_CACHE_TIME_BETWEEN_CLEANS < 0) {
                        return null;
                    }
            Severity: Minor
            Found in thumb.php - About 2 hrs to fix

            Cognitive Complexity

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

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

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

            Further reading

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

                protected function getLocalImagePath($src)
                {
                    $src = ltrim($src, '/'); //strip off the leading '/'
                    if (!$this->docRoot) {
                        $this->debug(3, 'We have no document root set, so as a last resort, lets check if the image is in the current dir and serve that.');
            Severity: Minor
            Found in thumb.php - About 2 hrs to fix

              Method serveWebshot has 45 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  protected function serveWebshot()
                  {
                      $this->debug(3, 'Starting serveWebshot');
                      $instr = 'Please follow the instructions at http://code.google.com/p/timthumb/ to set your server up for taking website screenshots.';
                      if (!is_file(WEBSHOT_CUTYCAPT)) {
              Severity: Minor
              Found in thumb.php - About 1 hr to fix

                Function tryServerCache has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                Open

                    protected function tryServerCache()
                    {
                        $this->debug(3, 'Trying server cache');
                        if (is_file($this->cachefile)) {
                            $this->debug(3, "Cachefile {$this->cachefile} exists");
                Severity: Minor
                Found in thumb.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 tryBrowserCache has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                Open

                    protected function tryBrowserCache()
                    {
                        if (BROWSER_CACHE_DISABLE) {
                            $this->debug(3, 'Browser caching is disabled');
                
                
                Severity: Minor
                Found in thumb.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

                The class Timthumb has 21 fields. Consider redesigning Timthumb to keep the number of fields under 15.
                Open

                class Timthumb
                {
                    protected        $src                      = '';
                    protected        $is404                    = false;
                    protected        $docRoot                  = '';
                Severity: Minor
                Found in thumb.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 tryBrowserCache has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    protected function tryBrowserCache()
                    {
                        if (BROWSER_CACHE_DISABLE) {
                            $this->debug(3, 'Browser caching is disabled');
                
                
                Severity: Minor
                Found in thumb.php - About 1 hr to fix

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

                      protected function handleErrors()
                      {
                          if ($this->haveErrors()) {
                              if (NOT_FOUND_IMAGE && $this->is404()) {
                                  if ($this->serveImg(NOT_FOUND_IMAGE)) {
                  Severity: Minor
                  Found in thumb.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 serveCacheFile has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      protected function serveCacheFile()
                      {
                          $this->debug(3, "Serving {$this->cachefile}");
                          if (!is_file($this->cachefile)) {
                              $this->error("serveCacheFile called in timthumb but we couldn't find the cached file.");
                  Severity: Minor
                  Found in thumb.php - About 1 hr to fix

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

                        public function run()
                        {
                            if ($this->isURL) {
                                if (!ALLOW_EXTERNAL) {
                                    $this->debug(1, 'Got a request for an external image but ALLOW_EXTERNAL is disabled so returning error msg.');
                    Severity: Minor
                    Found in thumb.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 cleanCache has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        protected function cleanCache()
                        {
                            if (FILE_CACHE_TIME_BETWEEN_CLEANS < 0) {
                                return null;
                            }
                    Severity: Minor
                    Found in thumb.php - About 1 hr to fix

                      Method tryServerCache has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          protected function tryServerCache()
                          {
                              $this->debug(3, 'Trying server cache');
                              if (is_file($this->cachefile)) {
                                  $this->debug(3, "Cachefile {$this->cachefile} exists");
                      Severity: Minor
                      Found in thumb.php - About 1 hr to fix

                        Method serveExternalImage has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            protected function serveExternalImage()
                            {
                                if (!preg_match('/^https?:\/\/[a-zA-Z0-9\-\.]+/i', $this->src)) {
                                    $this->error('Invalid URL supplied.');
                        
                        
                        Severity: Minor
                        Found in thumb.php - About 1 hr to fix

                          Consider simplifying this complex logical expression.
                          Open

                                  if ('png' === $imgType && OPTIPNG_ENABLED && OPTIPNG_PATH && @is_file(OPTIPNG_PATH)) {
                                      $exec = OPTIPNG_PATH;
                                      $this->debug(3, "optipng'ing $tempfile");
                                      $presize = filesize($tempfile);
                                      $out     = shell_exec('$exec -o1 $tempfile'); //you can use up to -o7 but it really slows things down
                          Severity: Major
                          Found in thumb.php - About 1 hr to fix

                            Function calcDocRoot has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                            Open

                                protected function calcDocRoot()
                                {
                                    $docRoot = @$_SERVER['DOCUMENT_ROOT'];
                                    if (defined('LOCAL_FILE_BASE_DIRECTORY')) {
                                        $docRoot = LOCAL_FILE_BASE_DIRECTORY;
                            Severity: Minor
                            Found in thumb.php - About 55 mins to fix

                            Cognitive Complexity

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

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

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

                            Further reading

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

                                protected function getIP()
                                {
                                    $rem = @$_SERVER['REMOTE_ADDR'];
                                    $ff  = @$_SERVER['HTTP_X_FORWARDED_FOR'];
                                    $ci  = @$_SERVER['HTTP_CLIENT_IP'];
                            Severity: Minor
                            Found in thumb.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

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

                                protected function serveWebshot()
                                {
                                    $this->debug(3, 'Starting serveWebshot');
                                    $instr = 'Please follow the instructions at http://code.google.com/p/timthumb/ to set your server up for taking website screenshots.';
                                    if (!is_file(WEBSHOT_CUTYCAPT)) {
                            Severity: Minor
                            Found in thumb.php - About 35 mins to fix

                            Cognitive Complexity

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

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

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

                            Further reading

                            Avoid too many return statements within this method.
                            Open

                                        return true;
                            Severity: Major
                            Found in thumb.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                              return false;
                              Severity: Major
                              Found in thumb.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                            return true;
                                Severity: Major
                                Found in thumb.php - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                              return false;
                                  Severity: Major
                                  Found in thumb.php - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                            return true;
                                    Severity: Major
                                    Found in thumb.php - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                              return true;
                                      Severity: Major
                                      Found in thumb.php - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                                return false;
                                        Severity: Major
                                        Found in thumb.php - About 30 mins to fix

                                          Avoid too many return statements within this method.
                                          Open

                                                      return false;
                                          Severity: Major
                                          Found in thumb.php - About 30 mins to fix

                                            Avoid too many return statements within this method.
                                            Open

                                                        return $this->error('Could not get a lock for writing.');
                                            Severity: Major
                                            Found in thumb.php - About 30 mins to fix

                                              Avoid too many return statements within this method.
                                              Open

                                                          return $this->serveCacheFile();
                                              Severity: Major
                                              Found in thumb.php - About 30 mins to fix

                                                Avoid too many return statements within this method.
                                                Open

                                                            return $ci;
                                                Severity: Major
                                                Found in thumb.php - About 30 mins to fix

                                                  Avoid too many return statements within this method.
                                                  Open

                                                                      return $real;
                                                  Severity: Major
                                                  Found in thumb.php - About 30 mins to fix

                                                    Avoid too many return statements within this method.
                                                    Open

                                                            return false;
                                                    Severity: Major
                                                    Found in thumb.php - About 30 mins to fix

                                                      Avoid too many return statements within this method.
                                                      Open

                                                                          return $this->error('You may not fetch images from that site. To enable this site in timthumb, you can either add it to $allowedSites and set ALLOW_EXTERNAL=true. Or you can set ALLOW_ALL_EXTERNAL_SITES=true, depending on your security needs.');
                                                      Severity: Major
                                                      Found in thumb.php - About 30 mins to fix

                                                        Avoid too many return statements within this method.
                                                        Open

                                                                return false;
                                                        Severity: Major
                                                        Found in thumb.php - About 30 mins to fix

                                                          Avoid too many return statements within this method.
                                                          Open

                                                                  return null;
                                                          Severity: Major
                                                          Found in thumb.php - About 30 mins to fix

                                                            Avoid too many return statements within this method.
                                                            Open

                                                                        return $this->error('Could not open the lockfile for writing an image.');
                                                            Severity: Major
                                                            Found in thumb.php - About 30 mins to fix

                                                              Avoid too many return statements within this method.
                                                              Open

                                                                              return false;
                                                              Severity: Major
                                                              Found in thumb.php - About 30 mins to fix

                                                                Avoid too many return statements within this method.
                                                                Open

                                                                        return true;
                                                                Severity: Major
                                                                Found in thumb.php - About 30 mins to fix

                                                                  Avoid too many return statements within this method.
                                                                  Open

                                                                          return false;
                                                                  Severity: Major
                                                                  Found in thumb.php - About 30 mins to fix

                                                                    Avoid too many return statements within this method.
                                                                    Open

                                                                            return false;
                                                                    Severity: Major
                                                                    Found in thumb.php - About 30 mins to fix

                                                                      Avoid too many return statements within this method.
                                                                      Open

                                                                              return false;
                                                                      Severity: Major
                                                                      Found in thumb.php - About 30 mins to fix

                                                                        Avoid too many return statements within this method.
                                                                        Open

                                                                                    return $ff;
                                                                        Severity: Major
                                                                        Found in thumb.php - About 30 mins to fix

                                                                          Avoid too many return statements within this method.
                                                                          Open

                                                                                  return 'UNKNOWN';
                                                                          Severity: Major
                                                                          Found in thumb.php - About 30 mins to fix

                                                                            The method serveWebshot() has an NPath complexity of 1024. The configured NPath complexity threshold is 200.
                                                                            Open

                                                                                protected function serveWebshot()
                                                                                {
                                                                                    $this->debug(3, 'Starting serveWebshot');
                                                                                    $instr = 'Please follow the instructions at http://code.google.com/p/timthumb/ to set your server up for taking website screenshots.';
                                                                                    if (!is_file(WEBSHOT_CUTYCAPT)) {
                                                                            Severity: Minor
                                                                            Found in thumb.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 __construct() has 106 lines of code. Current threshold is set to 100. Avoid really long methods.
                                                                            Open

                                                                                public function __construct()
                                                                                {
                                                                                    global $allowedSites;
                                                                                    $this->startTime = microtime(true);
                                                                                    date_default_timezone_set('UTC');
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            The method __construct() has an NPath complexity of 43200. The configured NPath complexity threshold is 200.
                                                                            Open

                                                                                public function __construct()
                                                                                {
                                                                                    global $allowedSites;
                                                                                    $this->startTime = microtime(true);
                                                                                    date_default_timezone_set('UTC');
                                                                            Severity: Minor
                                                                            Found in thumb.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 processImageAndWriteToCache() has an NPath complexity of 302778777600. The configured NPath complexity threshold is 200.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 processImageAndWriteToCache() has 311 lines of code. Current threshold is set to 100. Avoid really long methods.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            The class Timthumb has 1344 lines of code. Current threshold is 1000. Avoid really long classes.
                                                                            Open

                                                                            class Timthumb
                                                                            {
                                                                                protected        $src                      = '';
                                                                                protected        $is404                    = false;
                                                                                protected        $docRoot                  = '';
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            The method getLocalImagePath() has an NPath complexity of 864. The configured NPath complexity threshold is 200.
                                                                            Open

                                                                                protected function getLocalImagePath($src)
                                                                                {
                                                                                    $src = ltrim($src, '/'); //strip off the leading '/'
                                                                                    if (!$this->docRoot) {
                                                                                        $this->debug(3, 'We have no document root set, so as a last resort, lets check if the image is in the current dir and serve that.');
                                                                            Severity: Minor
                                                                            Found in thumb.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 getURL() has an NPath complexity of 238. The configured NPath complexity threshold is 200.
                                                                            Open

                                                                                protected function getURL($url, $tempfile)
                                                                                {
                                                                                    $this->lastURLError = false;
                                                                                    $url                = preg_replace('/ /', '%20', $url);
                                                                                    if (function_exists('curl_init')) {
                                                                            Severity: Minor
                                                                            Found in thumb.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 processImageAndWriteToCache() has a Cyclomatic Complexity of 65. The configured cyclomatic complexity threshold is 10.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 __construct() has a Cyclomatic Complexity of 23. The configured cyclomatic complexity threshold is 10.
                                                                            Open

                                                                                public function __construct()
                                                                                {
                                                                                    global $allowedSites;
                                                                                    $this->startTime = microtime(true);
                                                                                    date_default_timezone_set('UTC');
                                                                            Severity: Minor
                                                                            Found in thumb.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 serveWebshot() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
                                                                            Open

                                                                                protected function serveWebshot()
                                                                                {
                                                                                    $this->debug(3, 'Starting serveWebshot');
                                                                                    $instr = 'Please follow the instructions at http://code.google.com/p/timthumb/ to set your server up for taking website screenshots.';
                                                                                    if (!is_file(WEBSHOT_CUTYCAPT)) {
                                                                            Severity: Minor
                                                                            Found in thumb.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 getLocalImagePath() has a Cyclomatic Complexity of 14. The configured cyclomatic complexity threshold is 10.
                                                                            Open

                                                                                protected function getLocalImagePath($src)
                                                                                {
                                                                                    $src = ltrim($src, '/'); //strip off the leading '/'
                                                                                    if (!$this->docRoot) {
                                                                                        $this->debug(3, 'We have no document root set, so as a last resort, lets check if the image is in the current dir and serve that.');
                                                                            Severity: Minor
                                                                            Found in thumb.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 getURL() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
                                                                            Open

                                                                                protected function getURL($url, $tempfile)
                                                                                {
                                                                                    $this->lastURLError = false;
                                                                                    $url                = preg_replace('/ /', '%20', $url);
                                                                                    if (function_exists('curl_init')) {
                                                                            Severity: Minor
                                                                            Found in thumb.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

                                                                            Remove error control operator '@' on line 307.
                                                                            Open

                                                                                public function __construct()
                                                                                {
                                                                                    global $allowedSites;
                                                                                    $this->startTime = microtime(true);
                                                                                    date_default_timezone_set('UTC');
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 307.
                                                                            Open

                                                                                public function __construct()
                                                                                {
                                                                                    global $allowedSites;
                                                                                    $this->startTime = microtime(true);
                                                                                    date_default_timezone_set('UTC');
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 1537.
                                                                            Open

                                                                                protected function getURL($url, $tempfile)
                                                                                {
                                                                                    $this->lastURLError = false;
                                                                                    $url                = preg_replace('/ /', '%20', $url);
                                                                                    if (function_exists('curl_init')) {
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Missing class import via use statement (line '312', column '31').
                                                                            Open

                                                                                                throw new \RuntimeException(sprintf('Directory "%s" was not created', $concurrentDirectory));
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            MissingImport

                                                                            Since: 2.7.0

                                                                            Importing all external classes in a file through use statements makes them clearly visible.

                                                                            Example

                                                                            function make() {
                                                                                return new \stdClass();
                                                                            }

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

                                                                            Remove error control operator '@' on line 540.
                                                                            Open

                                                                                protected function tryServerCache()
                                                                                {
                                                                                    $this->debug(3, 'Trying server cache');
                                                                                    if (is_file($this->cachefile)) {
                                                                                        $this->debug(3, "Cachefile {$this->cachefile} exists");
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 670.
                                                                            Open

                                                                                protected function cleanCache()
                                                                                {
                                                                                    if (FILE_CACHE_TIME_BETWEEN_CLEANS < 0) {
                                                                                        return null;
                                                                                    }
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 494.
                                                                            Open

                                                                                protected function tryBrowserCache()
                                                                                {
                                                                                    if (BROWSER_CACHE_DISABLE) {
                                                                                        $this->debug(3, 'Browser caching is disabled');
                                                                            
                                                                            
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 927.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 1513.
                                                                            Open

                                                                                protected function getURL($url, $tempfile)
                                                                                {
                                                                                    $this->lastURLError = false;
                                                                                    $url                = preg_replace('/ /', '%20', $url);
                                                                                    if (function_exists('curl_init')) {
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 972.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 1202.
                                                                            Open

                                                                                protected function serveExternalImage()
                                                                                {
                                                                                    if (!preg_match('/^https?:\/\/[a-zA-Z0-9\-\.]+/i', $this->src)) {
                                                                                        $this->error('Invalid URL supplied.');
                                                                            
                                                                            
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 984.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 1270.
                                                                            Open

                                                                                protected function serveCacheFile()
                                                                                {
                                                                                    $this->debug(3, "Serving {$this->cachefile}");
                                                                                    if (!is_file($this->cachefile)) {
                                                                                        $this->error("serveCacheFile called in timthumb but we couldn't find the cached file.");
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 1380.
                                                                            Open

                                                                                protected function getIP()
                                                                                {
                                                                                    $rem = @$_SERVER['REMOTE_ADDR'];
                                                                                    $ff  = @$_SERVER['HTTP_X_FORWARDED_FOR'];
                                                                                    $ci  = @$_SERVER['HTTP_CLIENT_IP'];
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 1574.
                                                                            Open

                                                                                protected function serveImg($file)
                                                                                {
                                                                                    $s = getimagesize($file);
                                                                                    if (!($s && $s['mime'])) {
                                                                                        return false;
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 657.
                                                                            Open

                                                                                protected function cleanCache()
                                                                                {
                                                                                    if (FILE_CACHE_TIME_BETWEEN_CLEANS < 0) {
                                                                                        return null;
                                                                                    }
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 980.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 397.
                                                                            Open

                                                                                public function __construct()
                                                                                {
                                                                                    global $allowedSites;
                                                                                    $this->startTime = microtime(true);
                                                                                    date_default_timezone_set('UTC');
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 668.
                                                                            Open

                                                                                protected function cleanCache()
                                                                                {
                                                                                    if (FILE_CACHE_TIME_BETWEEN_CLEANS < 0) {
                                                                                        return null;
                                                                                    }
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 1379.
                                                                            Open

                                                                                protected function getIP()
                                                                                {
                                                                                    $rem = @$_SERVER['REMOTE_ADDR'];
                                                                                    $ff  = @$_SERVER['HTTP_X_FORWARDED_FOR'];
                                                                                    $ci  = @$_SERVER['HTTP_CLIENT_IP'];
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 962.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 538.
                                                                            Open

                                                                                protected function tryServerCache()
                                                                                {
                                                                                    $this->debug(3, 'Trying server cache');
                                                                                    if (is_file($this->cachefile)) {
                                                                                        $this->debug(3, "Cachefile {$this->cachefile} exists");
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 988.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 1381.
                                                                            Open

                                                                                protected function getIP()
                                                                                {
                                                                                    $rem = @$_SERVER['REMOTE_ADDR'];
                                                                                    $ff  = @$_SERVER['HTTP_X_FORWARDED_FOR'];
                                                                                    $ci  = @$_SERVER['HTTP_CLIENT_IP'];
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 1578.
                                                                            Open

                                                                                protected function serveImg($file)
                                                                                {
                                                                                    $s = getimagesize($file);
                                                                                    if (!($s && $s['mime'])) {
                                                                                        return false;
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 1213.
                                                                            Open

                                                                                protected function serveExternalImage()
                                                                                {
                                                                                    if (!preg_match('/^https?:\/\/[a-zA-Z0-9\-\.]+/i', $this->src)) {
                                                                                        $this->error('Invalid URL supplied.');
                                                                            
                                                                            
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 1264.
                                                                            Open

                                                                                protected function serveCacheFile()
                                                                                {
                                                                                    $this->debug(3, "Serving {$this->cachefile}");
                                                                                    if (!is_file($this->cachefile)) {
                                                                                        $this->error("serveCacheFile called in timthumb but we couldn't find the cached file.");
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 560.
                                                                            Open

                                                                                protected function tryServerCache()
                                                                                {
                                                                                    $this->debug(3, 'Trying server cache');
                                                                                    if (is_file($this->cachefile)) {
                                                                                        $this->debug(3, "Cachefile {$this->cachefile} exists");
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 987.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 410.
                                                                            Open

                                                                                public function __destruct()
                                                                                {
                                                                                    foreach ($this->toDeletes as $del) {
                                                                                        $this->debug(2, "Deleting temp file $del");
                                                                                        @unlink($del);
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 942.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 1001.
                                                                            Open

                                                                                protected function calcDocRoot()
                                                                                {
                                                                                    $docRoot = @$_SERVER['DOCUMENT_ROOT'];
                                                                                    if (defined('LOCAL_FILE_BASE_DIRECTORY')) {
                                                                                        $docRoot = LOCAL_FILE_BASE_DIRECTORY;
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

                                                                            Remove error control operator '@' on line 1514.
                                                                            Open

                                                                                protected function getURL($url, $tempfile)
                                                                                {
                                                                                    $this->lastURLError = false;
                                                                                    $url                = preg_replace('/ /', '%20', $url);
                                                                                    if (function_exists('curl_init')) {
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ErrorControlOperator

                                                                            Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.

                                                                            Example

                                                                            function foo($filePath) {
                                                                                $file = @fopen($filPath); // hides exceptions
                                                                                $key = @$array[$notExistingKey]; // assigns null to $key
                                                                            }

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

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

                                                                                    } else {
                                                                                        $this->debug(2, 'Is a request for an internal file: ' . $this->src);
                                                                                    }
                                                                            Severity: Minor
                                                                            Found in thumb.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 processImageAndWriteToCache uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                            Open

                                                                                                    } else {
                                                                                                        $filterSettings[$i] = null;
                                                                                                    }
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ElseExpression

                                                                            Since: 1.4.0

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

                                                                            Example

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

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

                                                                            Avoid using static access to class '\Xmf\Request' in method '__construct'.
                                                                            Open

                                                                                    $this->myHost = preg_replace('/^www\./i', '', \Xmf\Request::getString('HTTP_HOST', '', 'SERVER'));
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            StaticAccess

                                                                            Since: 1.4.0

                                                                            Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                                                            Example

                                                                            class Foo
                                                                            {
                                                                                public function bar()
                                                                                {
                                                                                    Bar::baz();
                                                                                }
                                                                            }

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

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

                                                                                            } else {
                                                                                                $this->error('You added the webshot parameter but webshots are disabled on this server. You need to set WEBSHOT_ENABLED === true to enable webshots.');
                                                                                            }
                                                                            Severity: Minor
                                                                            Found in thumb.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 processImageAndWriteToCache uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                            Open

                                                                                    } else {
                                                                                        // copy and resize part of an image with resampling
                                                                                        imagecopyresampled($canvas, $image, 0, 0, 0, 0, (int)$newWidth, (int)$newHeight, (int)$width, (int)$height);
                                                                                    }
                                                                            Severity: Minor
                                                                            Found in thumb.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 __construct uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                            Open

                                                                                    } else {
                                                                                        $this->localImage = $this->getLocalImagePath($this->src);
                                                                                        if (!$this->localImage) {
                                                                                            $this->debug(1, "Could not find the local image: {$this->localImage}");
                                                                                            $this->error('Could not find the internal image you specified.');
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ElseExpression

                                                                            Since: 1.4.0

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

                                                                            Example

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

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

                                                                            Avoid using static access to class '\Xmf\Request' in method '__construct'.
                                                                            Open

                                                                                    if (BLOCK_EXTERNAL_LEECHERS && array_key_exists('HTTP_REFERER', $_SERVER) && (!preg_match('/^https?:\/\/(?:www\.)?' . $this->myHost . '(?:$|\/)/i', \Xmf\Request::getString('HTTP_REFERER', '', 'SERVER')))) {
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            StaticAccess

                                                                            Since: 1.4.0

                                                                            Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                                                            Example

                                                                            class Foo
                                                                            {
                                                                                public function bar()
                                                                                {
                                                                                    Bar::baz();
                                                                                }
                                                                            }

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

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

                                                                                    } else {
                                                                                        $this->debug(3, 'Got request for internal image. Starting serveInternalImage()');
                                                                                        $this->serveInternalImage();
                                                                                    }
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ElseExpression

                                                                            Since: 1.4.0

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

                                                                            Example

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

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

                                                                            Avoid using static access to class '\Xmf\Request' in method '__construct'.
                                                                            Open

                                                                                    $this->debug(1, 'Starting new request from ' . $this->getIP() . ' to ' . Request::getString('REQUEST_URI', '', 'SERVER'));
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            StaticAccess

                                                                            Since: 1.4.0

                                                                            Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                                                            Example

                                                                            class Foo
                                                                            {
                                                                                public function bar()
                                                                                {
                                                                                    Bar::baz();
                                                                                }
                                                                            }

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

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

                                                                                        } else {
                                                                                            $this->debug(3, "Trying to serve cachefile {$this->cachefile}");
                                                                                        }
                                                                            Severity: Minor
                                                                            Found in thumb.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 processImageAndWriteToCache uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                            Open

                                                                                        } else {
                                                                                            $newHeight = $final_height;
                                                                                        }
                                                                            Severity: Minor
                                                                            Found in thumb.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 processImageAndWriteToCache uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                            Open

                                                                                    } else {
                                                                                        fclose($fh);
                                                                                        @unlink($lockFile);
                                                                                        @unlink($tempfile4);
                                                                            
                                                                            
                                                                            Severity: Minor
                                                                            Found in thumb.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 run uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                            Open

                                                                                        } else {
                                                                                            $this->debug(3, 'webshot is NOT set so we\'re going to try to fetch a regular image.');
                                                                                            $this->serveExternalImage();
                                                                                        }
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ElseExpression

                                                                            Since: 1.4.0

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

                                                                            Example

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

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

                                                                            Avoid using static access to class '\Xmf\Request' in method 'tryBrowserCache'.
                                                                            Open

                                                                                    if (\Xmf\Request::hasVar('HTTP_IF_MODIFIED_SINCE', 'SERVER')) {
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            StaticAccess

                                                                            Since: 1.4.0

                                                                            Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                                                            Example

                                                                            class Foo
                                                                            {
                                                                                public function bar()
                                                                                {
                                                                                    Bar::baz();
                                                                                }
                                                                            }

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

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

                                                                                            } else {
                                                                                                $this->debug(1, "pngcrush did not reduce file size. Difference was $sizeDrop bytes.");
                                                                                                $todel = $tempfile2;
                                                                                            }
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ElseExpression

                                                                            Since: 1.4.0

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

                                                                            Example

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

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

                                                                            Avoid using static access to class '\Xmf\Request' in method 'calcDocRoot'.
                                                                            Open

                                                                                        if (\Xmf\Request::hasVar('SCRIPT_FILENAME', 'SERVER')) {
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            StaticAccess

                                                                            Since: 1.4.0

                                                                            Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                                                            Example

                                                                            class Foo
                                                                            {
                                                                                public function bar()
                                                                                {
                                                                                    Bar::baz();
                                                                                }
                                                                            }

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

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

                                                                                public function __construct()
                                                                                {
                                                                                    global $allowedSites;
                                                                                    $this->startTime = microtime(true);
                                                                                    date_default_timezone_set('UTC');
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            IfStatementAssignment

                                                                            Since: 2.7.0

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

                                                                            Example

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

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

                                                                            Avoid using static access to class '\Xmf\Request' in method 'calcDocRoot'.
                                                                            Open

                                                                                        if (\Xmf\Request::hasVar('PATH_TRANSLATED', 'SERVER')) {
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            StaticAccess

                                                                            Since: 1.4.0

                                                                            Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                                                            Example

                                                                            class Foo
                                                                            {
                                                                                public function bar()
                                                                                {
                                                                                    Bar::baz();
                                                                                }
                                                                            }

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

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

                                                                                    } else {
                                                                                        $color = imagecolorallocatealpha($canvas, $canvas_color_R, $canvas_color_G, $canvas_color_B, 0);
                                                                                    }
                                                                            Severity: Minor
                                                                            Found in thumb.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 processImageAndWriteToCache uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                            Open

                                                                                    } else {
                                                                                        return $this->sanityFail('Could not match mime type after verifying it previously.');
                                                                                    }
                                                                            Severity: Minor
                                                                            Found in thumb.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 __construct uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                            Open

                                                                                    } else {
                                                                                        $this->cacheDirectory = sys_get_temp_dir();
                                                                                    }
                                                                            Severity: Minor
                                                                            Found in thumb.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 setMemoryLimit uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                            Open

                                                                                    } else {
                                                                                        $this->debug(3, 'Not adjusting memory size because the current setting is ' . $inimem . ' and our size of ' . MEMORY_LIMIT . ' is smaller.');
                                                                                    }
                                                                            Severity: Minor
                                                                            Found in thumb.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 processImageAndWriteToCache uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                            Open

                                                                                        } else {
                                                                                            $origin_y  = $newHeight / 2;
                                                                                            $newHeight = $final_height;
                                                                                            $origin_y  = round($origin_y - ($newHeight / 2));
                                                                                        }
                                                                            Severity: Minor
                                                                            Found in thumb.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 processImageAndWriteToCache uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                            Open

                                                                                        } else {
                                                                                            $this->debug(1, 'optipng did not change image size.');
                                                                                        }
                                                                            Severity: Minor
                                                                            Found in thumb.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 processImageAndWriteToCache uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                            Open

                                                                                        } else {
                                                                                            $this->debug(3, "pngcrush failed with output: $out");
                                                                                            $todel = $tempfile2;
                                                                                        }
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ElseExpression

                                                                            Since: 1.4.0

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

                                                                            Example

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

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

                                                                            Avoid using static access to class '\Xmf\Request' in method 'param'.
                                                                            Open

                                                                                        return Request::getString($property, '', 'GET');
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            StaticAccess

                                                                            Since: 1.4.0

                                                                            Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

                                                                            Example

                                                                            class Foo
                                                                            {
                                                                                public function bar()
                                                                                {
                                                                                    Bar::baz();
                                                                                }
                                                                            }

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

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

                                                                                    } else {
                                                                                        $subDirectories = explode('/', str_replace($this->docRoot, '', $_SERVER['SCRIPT_FILENAME']));
                                                                                    }
                                                                            Severity: Minor
                                                                            Found in thumb.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 serveWebshot uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                            Open

                                                                                    } else {
                                                                                        $command = "$xv --server-args=\"-screen 0, {$screenX}x{$screenY}x{$colDepth}\" $cuty $proxy --max-wait=$timeout --user-agent=\"$ua\" --javascript=$jsOn --java=$javaOn --plugins=$pluginsOn --js-can-open-windows=off --url=\"$url\" --out-format=$format --out=$tempfile";
                                                                                    }
                                                                            Severity: Minor
                                                                            Found in thumb.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 sendImageHeaders uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                            Open

                                                                                    } else {
                                                                                        $this->debug(3, 'Browser caching is enabled');
                                                                                        header('Cache-Control: max-age=' . BROWSER_CACHE_MAX_AGE . ', must-revalidate');
                                                                                        header('Expires: ' . $gmdateExpires);
                                                                                    }
                                                                            Severity: Minor
                                                                            Found in thumb.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 __construct uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                                                            Open

                                                                                        } else {
                                                                                            $this->debug(2, 'Fetching only from selected external sites is enabled.');
                                                                                            $allowed = false;
                                                                                            foreach ($allowedSites as $site) {
                                                                                                if ((mb_strtolower($this->url['host']) === \mb_strtolower($site)) || (mb_strtolower(mb_substr($this->url['host'], -mb_strlen($site) - 1)) === \mb_strtolower(".$site"))) {
                                                                            Severity: Minor
                                                                            Found in thumb.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 start() contains an exit expression.
                                                                            Open

                                                                                        exit(0);
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ExitExpression

                                                                            Since: 0.2

                                                                            An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

                                                                            Example

                                                                            class Foo {
                                                                                public function bar($param)  {
                                                                                    if ($param === 42) {
                                                                                        exit(23);
                                                                                    }
                                                                                }
                                                                            }

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

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

                                                                                        $exec = OPTIPNG_PATH;
                                                                            Severity: Minor
                                                                            Found in thumb.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 parameters such as '$h'.
                                                                            Open

                                                                                public static function curlWrite($h, $d)
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            UnusedFormalParameter

                                                                            Since: 0.2

                                                                            Avoid passing parameters to methods or constructors and then not using those parameters.

                                                                            Example

                                                                            class Foo
                                                                            {
                                                                                private function bar($howdy)
                                                                                {
                                                                                    // $howdy is not used
                                                                                }
                                                                            }

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

                                                                            The method start() contains an exit expression.
                                                                            Open

                                                                                        exit(0);
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ExitExpression

                                                                            Since: 0.2

                                                                            An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

                                                                            Example

                                                                            class Foo {
                                                                                public function bar($param)  {
                                                                                    if ($param === 42) {
                                                                                        exit(23);
                                                                                    }
                                                                                }
                                                                            }

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

                                                                            The method handleErrors() contains an exit expression.
                                                                            Open

                                                                                                exit(0);
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ExitExpression

                                                                            Since: 0.2

                                                                            An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

                                                                            Example

                                                                            class Foo {
                                                                                public function bar($param)  {
                                                                                    if ($param === 42) {
                                                                                        exit(23);
                                                                                    }
                                                                                }
                                                                            }

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

                                                                            The method handleErrors() contains an exit expression.
                                                                            Open

                                                                                        exit(0);
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ExitExpression

                                                                            Since: 0.2

                                                                            An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

                                                                            Example

                                                                            class Foo {
                                                                                public function bar($param)  {
                                                                                    if ($param === 42) {
                                                                                        exit(23);
                                                                                    }
                                                                                }
                                                                            }

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

                                                                            The method handleErrors() contains an exit expression.
                                                                            Open

                                                                                                exit(0);
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ExitExpression

                                                                            Since: 0.2

                                                                            An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

                                                                            Example

                                                                            class Foo {
                                                                                public function bar($param)  {
                                                                                    if ($param === 42) {
                                                                                        exit(23);
                                                                                    }
                                                                                }
                                                                            }

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

                                                                            The method start() contains an exit expression.
                                                                            Open

                                                                                    exit(0);
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ExitExpression

                                                                            Since: 0.2

                                                                            An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

                                                                            Example

                                                                            class Foo {
                                                                                public function bar($param)  {
                                                                                    if ($param === 42) {
                                                                                        exit(23);
                                                                                    }
                                                                                }
                                                                            }

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

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

                                                                                protected        $filePrependSecurityBlock = "<?php exit('Execution denied!'); //"; //Designed to have three letter mime type, space, question mark and greater than symbol appended. 6 bytes total.
                                                                            Severity: Minor
                                                                            Found in thumb.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 Timthumb
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

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

                                                                                public static function curlWrite($h, $d)
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ShortVariable

                                                                            Since: 0.2

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

                                                                            Example

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

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

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

                                                                                    $fh       = fopen($lockFile, 'wb');
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ShortVariable

                                                                            Since: 0.2

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

                                                                            Example

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

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

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

                                                                                    $xv        = WEBSHOT_XVFB;
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ShortVariable

                                                                            Since: 0.2

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

                                                                            Example

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

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

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

                                                                                    $ua        = WEBSHOT_USER_AGENT;
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ShortVariable

                                                                            Since: 0.2

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

                                                                            Example

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

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

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

                                                                                    $fp = fopen($this->cachefile, 'rb');
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ShortVariable

                                                                            Since: 0.2

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

                                                                            Example

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

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

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

                                                                                public static function curlWrite($h, $d)
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ShortVariable

                                                                            Since: 0.2

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

                                                                            Example

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

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

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

                                                                                    $ff  = @$_SERVER['HTTP_X_FORWARDED_FOR'];
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ShortVariable

                                                                            Since: 0.2

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

                                                                            Example

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

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

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

                                                                                    $fp        = fopen($tempfile, 'rb', false, $context);
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ShortVariable

                                                                            Since: 0.2

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

                                                                            Example

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

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

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

                                                                                    $s = getimagesize($file);
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ShortVariable

                                                                            Since: 0.2

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

                                                                            Example

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

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

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

                                                                                    $ci  = @$_SERVER['HTTP_CLIENT_IP'];
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            ShortVariable

                                                                            Since: 0.2

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

                                                                            Example

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

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

                                                                            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 30 and the first side effect is on line 28.
                                                                            Open

                                                                            <?php
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

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

                                                                                        case 'g':
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

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

                                                                                        case 'k':
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

                                                                            Scope keyword "protected" must be followed by a single space
                                                                            Open

                                                                                protected        $url                      = false;
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

                                                                            Scope keyword "protected" must be followed by a single space
                                                                            Open

                                                                                protected        $isURL                    = false;
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

                                                                            Scope keyword "protected" must be followed by a single space
                                                                            Open

                                                                                protected        $docRoot                  = '';
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

                                                                            Scope keyword "protected" must be followed by a single space
                                                                            Open

                                                                                protected        $localImageMTime          = 0.0;
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

                                                                            Scope keyword "protected" must be followed by a single space
                                                                            Open

                                                                                protected        $cachefile                = '';
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

                                                                            Scope keyword "protected" must be followed by a single space
                                                                            Open

                                                                                protected        $filePrependSecurityBlock = "<?php exit('Execution denied!'); //"; //Designed to have three letter mime type, space, question mark and greater than symbol appended. 6 bytes total.
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

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

                                                                                        case 'm':
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

                                                                            Scope keyword "protected" must be followed by a single space
                                                                            Open

                                                                                protected        $toDeletes                = [];
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

                                                                            Scope keyword "protected" must be followed by a single space
                                                                            Open

                                                                                protected        $cacheDirectory           = '';
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

                                                                            Scope keyword "protected" must be followed by a single space
                                                                            Open

                                                                                protected        $lastBenchTime            = 0.0;
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

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

                                                                                        case 'M':
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

                                                                            Scope keyword "protected" must be followed by a single space
                                                                            Open

                                                                                protected        $is404                    = false;
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

                                                                            Scope keyword "protected" must be followed by a single space
                                                                            Open

                                                                                protected        $localImage               = '';
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

                                                                            Scope keyword "protected" must be followed by a single space
                                                                            Open

                                                                                protected        $myHost                   = '';
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

                                                                            Scope keyword "protected" must be followed by a single space
                                                                            Open

                                                                                protected        $cropTop                  = false;
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

                                                                            Scope keyword "protected" must be followed by a single space
                                                                            Open

                                                                                protected        $salt                     = '';
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

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

                                                                                        case 'image/jpeg':
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

                                                                            Scope keyword "protected" must be followed by a single space
                                                                            Open

                                                                                protected        $lastURLError             = false;
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

                                                                            Scope keyword "protected" must be followed by a single space
                                                                            Open

                                                                                protected        $startTime                = 0.0;
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

                                                                            Scope keyword "protected" must be followed by a single space
                                                                            Open

                                                                                protected        $src                      = '';
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

                                                                            Scope keyword "protected" must be followed by a single space
                                                                            Open

                                                                                protected        $errors                   = [];
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

                                                                            Scope keyword "protected" must be followed by a single space
                                                                            Open

                                                                                protected        $fileCacheVersion         = 1; //Generally if timthumb.php is modifed (upgraded) then the salt changes and all cache files are recreated. This is a backup mechanism to force regen.
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

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

                                                                                                    case 1:
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpcodesniffer

                                                                            The 'getURL()' method which returns a boolean should be named 'is...()' or 'has...()'
                                                                            Open

                                                                                protected function getURL($url, $tempfile)
                                                                                {
                                                                                    $this->lastURLError = false;
                                                                                    $url                = preg_replace('/ /', '%20', $url);
                                                                                    if (function_exists('curl_init')) {
                                                                            Severity: Minor
                                                                            Found in thumb.php by phpmd

                                                                            BooleanGetMethodName

                                                                            Since: 0.2

                                                                            Looks for methods named 'getX()' with 'boolean' as the return type. The convention is to name these methods 'isX()' or 'hasX()'.

                                                                            Example

                                                                            class Foo {
                                                                                /**
                                                                                 * @return boolean
                                                                                 */
                                                                                public function getFoo() {} // bad
                                                                                /**
                                                                                 * @return bool
                                                                                 */
                                                                                public function isFoo(); // ok
                                                                                /**
                                                                                 * @return boolean
                                                                                 */
                                                                                public function getFoo($bar); // ok, unless checkParameterizedMethods=true
                                                                            }

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

                                                                            The variable $final_height is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_color is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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_y is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $cmp_y is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_color is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $origin_x is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $cmp_y is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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_x is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $gmdate_modified is not named in camelCase.
                                                                            Open

                                                                                protected function sendImageHeaders($mimeType, $dataSize)
                                                                                {
                                                                                    if (!preg_match('/^image\//i', $mimeType)) {
                                                                                        $mimeType = 'image/' . $mimeType;
                                                                                    }
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_color is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $cmp_y is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $origin_y is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_trans is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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_h is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $cmp_y is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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_w is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_color is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_color is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $origin_y is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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_y is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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_w is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_color_R is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $origin_x is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_color is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $origin_y is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $cmp_x is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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_h is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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_h is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_color is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_color_B is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $cmp_x is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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_x is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $cmp_x is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $final_height is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_color_G is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_color_B is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $cmp_y is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_color_R is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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_h is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $cmp_x is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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_x is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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_x is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $gmdate_modified is not named in camelCase.
                                                                            Open

                                                                                protected function sendImageHeaders($mimeType, $dataSize)
                                                                                {
                                                                                    if (!preg_match('/^image\//i', $mimeType)) {
                                                                                        $mimeType = 'image/' . $mimeType;
                                                                                    }
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_color_G is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_color_G is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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_x is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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_w is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $final_height is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_color is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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_w is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $cmp_y is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $origin_y is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_color is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $cmp_y is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $origin_x is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $cmp_x is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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_y is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_trans is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_color is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_color is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $final_height is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $origin_y is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $cmp_x is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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_y is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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_y is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $origin_x is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_color_B is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $canvas_color_R is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $final_height is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $origin_x is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $final_height is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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 $cmp_x is not named in camelCase.
                                                                            Open

                                                                                protected function processImageAndWriteToCache($localImage)
                                                                                {
                                                                                    $sData    = getimagesize($localImage);
                                                                                    $origType = $sData[2];
                                                                                    $mimeType = $sData['mime'];
                                                                            Severity: Minor
                                                                            Found in thumb.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