GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (1410)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

protected/extensions/phpthumb/EThumbnail.php (13 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
class EThumbnail extends CComponent
3
{
4
    /**
5
     * @var ThumbBase
6
     */
7
    private $_thumbnail;
8
9
    public function getDimensions()
10
    {
11
      return $this->_thumbnail->getCurrentDimensions();
0 ignored issues
show
Documentation Bug introduced by
The method getCurrentDimensions does not exist on object<ThumbBase>? Since you implemented __call, maybe consider adding a @method annotation.

If you implement __call and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.

This is often the case, when __call is implemented by a parent class and only the child class knows which methods exist:

class ParentClass {
    private $data = array();

    public function __call($method, array $args) {
        if (0 === strpos($method, 'get')) {
            return $this->data[strtolower(substr($method, 3))];
        }

        throw new \LogicException(sprintf('Unsupported method: %s', $method));
    }
}

/**
 * If this class knows which fields exist, you can specify the methods here:
 *
 * @method string getName()
 */
class SomeClass extends ParentClass { }
Loading history...
12
    }
13
14 1
    public function __construct($thumbnail) {
15 1
        $this->_thumbnail=$thumbnail;
16 1
    }
17
    /**
18
     * Re-sizes this image to the given dimensions.
19
     * @param integer $width the maximum width.
20
     * @param integer $height the maximum height.
21
     * @return EThumbnail
22
     */
23 1
    public function resize($width=0,$height=0)
24
    {
25 1
            $this->_thumbnail=$this->_thumbnail->resize($width,$height);
0 ignored issues
show
Documentation Bug introduced by
The method resize does not exist on object<ThumbBase>? Since you implemented __call, maybe consider adding a @method annotation.

If you implement __call and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.

This is often the case, when __call is implemented by a parent class and only the child class knows which methods exist:

class ParentClass {
    private $data = array();

    public function __call($method, array $args) {
        if (0 === strpos($method, 'get')) {
            return $this->data[strtolower(substr($method, 3))];
        }

        throw new \LogicException(sprintf('Unsupported method: %s', $method));
    }
}

/**
 * If this class knows which fields exist, you can specify the methods here:
 *
 * @method string getName()
 */
class SomeClass extends ParentClass { }
Loading history...
26 1
            return $this;
27
    }
28
29
    /**
30
     * Resizes the image to the given dimensions as close as possible,
31
     * then crops it from center.
32
     * @param integer $width the width to crop the image to.
33
     * @param integer $height the height to crop the image to.
34
     * @return EThumbnail
35
     */
36
    public function adaptiveResize($width,$height)
37
    {
38
            $this->_thumbnail=$this->_thumbnail->adaptiveResize($width,$height);
0 ignored issues
show
Documentation Bug introduced by
The method adaptiveResize does not exist on object<ThumbBase>? Since you implemented __call, maybe consider adding a @method annotation.

If you implement __call and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.

This is often the case, when __call is implemented by a parent class and only the child class knows which methods exist:

class ParentClass {
    private $data = array();

    public function __call($method, array $args) {
        if (0 === strpos($method, 'get')) {
            return $this->data[strtolower(substr($method, 3))];
        }

        throw new \LogicException(sprintf('Unsupported method: %s', $method));
    }
}

/**
 * If this class knows which fields exist, you can specify the methods here:
 *
 * @method string getName()
 */
class SomeClass extends ParentClass { }
Loading history...
39
            return $this;
40
    }
41
42
    /**
43
     * Resizes this image by the given percent uniformly.
44
     * @param integer $percent the percent to resize by.
45
     * @return EThumbnail
46
     */
47
    public function resizePercent($percent)
48
    {
49
            $this->_thumbnail=$this->_thumbnail->resizePercent($percent);
0 ignored issues
show
Documentation Bug introduced by
The method resizePercent does not exist on object<ThumbBase>? Since you implemented __call, maybe consider adding a @method annotation.

If you implement __call and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.

This is often the case, when __call is implemented by a parent class and only the child class knows which methods exist:

class ParentClass {
    private $data = array();

    public function __call($method, array $args) {
        if (0 === strpos($method, 'get')) {
            return $this->data[strtolower(substr($method, 3))];
        }

        throw new \LogicException(sprintf('Unsupported method: %s', $method));
    }
}

/**
 * If this class knows which fields exist, you can specify the methods here:
 *
 * @method string getName()
 */
class SomeClass extends ParentClass { }
Loading history...
50
            return $this;
51
    }
52
53
    /**
54
     * Crops this image from the given coordinates with the specified width and height.
55
     * This is also known as Vanilla-cropping.
56
     * @param integer $x the starting x-coordinate.
57
     * @param integer $y the starting y-coordinate.
58
     * @param integer $width the width to crop with.
59
     * @param integer $height the height to crop with.
60
     * @return EThumbnail
61
     */
62
    public function crop($x,$y,$width,$height)
63
    {
64
            $this->_thumbnail=$this->_thumbnail->crop($x,$y,$width,$height);
0 ignored issues
show
Documentation Bug introduced by
The method crop does not exist on object<ThumbBase>? Since you implemented __call, maybe consider adding a @method annotation.

If you implement __call and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.

This is often the case, when __call is implemented by a parent class and only the child class knows which methods exist:

class ParentClass {
    private $data = array();

    public function __call($method, array $args) {
        if (0 === strpos($method, 'get')) {
            return $this->data[strtolower(substr($method, 3))];
        }

        throw new \LogicException(sprintf('Unsupported method: %s', $method));
    }
}

/**
 * If this class knows which fields exist, you can specify the methods here:
 *
 * @method string getName()
 */
class SomeClass extends ParentClass { }
Loading history...
65
            return $this;
66
    }
67
68
    /**
69
     * Crops this image from the center with the specified width and height.
70
     * @param integer $width the width to crop with.
71
     * @param integer $height the height to crop with, if null the height will be the same as the width.
72
     * @return EThumbnail
73
     */
74
    public function cropFromCenter($width,$height=null)
75
    {
76
            $this->_thumbnail=$this->_thumbnail->cropFromCenter($width,$height);
0 ignored issues
show
Documentation Bug introduced by
The method cropFromCenter does not exist on object<ThumbBase>? Since you implemented __call, maybe consider adding a @method annotation.

If you implement __call and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.

This is often the case, when __call is implemented by a parent class and only the child class knows which methods exist:

class ParentClass {
    private $data = array();

    public function __call($method, array $args) {
        if (0 === strpos($method, 'get')) {
            return $this->data[strtolower(substr($method, 3))];
        }

        throw new \LogicException(sprintf('Unsupported method: %s', $method));
    }
}

/**
 * If this class knows which fields exist, you can specify the methods here:
 *
 * @method string getName()
 */
class SomeClass extends ParentClass { }
Loading history...
77
            return $this;
78
    }
79
80
    /**
81
     * Rotates this image by 90 degrees in the specified direction.
82
     * @param string $direction the direction to rotate the image in.
83
     * @return EThumbnail
84
     */
85
    public function rotateImage($direction='CW')
86
    {
87
            $this->_thumbnail=$this->_thumbnail->rotateImage($direction);
0 ignored issues
show
Documentation Bug introduced by
The method rotateImage does not exist on object<ThumbBase>? Since you implemented __call, maybe consider adding a @method annotation.

If you implement __call and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.

This is often the case, when __call is implemented by a parent class and only the child class knows which methods exist:

class ParentClass {
    private $data = array();

    public function __call($method, array $args) {
        if (0 === strpos($method, 'get')) {
            return $this->data[strtolower(substr($method, 3))];
        }

        throw new \LogicException(sprintf('Unsupported method: %s', $method));
    }
}

/**
 * If this class knows which fields exist, you can specify the methods here:
 *
 * @method string getName()
 */
class SomeClass extends ParentClass { }
Loading history...
88
            return $this;
89
    }
90
91
    /**
92
     * Rotates this image by the specified amount of degrees.
93
     * The image is always rotated clock-wise.
94
     * @param integer $degrees the amount of degrees.
95
     * @return EThumbnail
96
     */
97
    public function rotateImageNDegrees($degrees)
98
    {
99
            $this->_thumbnail=$this->_thumbnail->rotateImageNDegrees($degrees);
0 ignored issues
show
Documentation Bug introduced by
The method rotateImageNDegrees does not exist on object<ThumbBase>? Since you implemented __call, maybe consider adding a @method annotation.

If you implement __call and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.

This is often the case, when __call is implemented by a parent class and only the child class knows which methods exist:

class ParentClass {
    private $data = array();

    public function __call($method, array $args) {
        if (0 === strpos($method, 'get')) {
            return $this->data[strtolower(substr($method, 3))];
        }

        throw new \LogicException(sprintf('Unsupported method: %s', $method));
    }
}

/**
 * If this class knows which fields exist, you can specify the methods here:
 *
 * @method string getName()
 */
class SomeClass extends ParentClass { }
Loading history...
100
            return $this;
101
    }
102
103
    /**
104
     * Saves this image.
105
     * @param string $path the path where to save the image.
106
     * @param string $extension the file extension.
107
     * @return EThumbnail
108
     */
109 1
    public function save($path,$extension=null)
110
    {
111 1
            $this->_thumbnail=$this->_thumbnail->save($path,$extension);
0 ignored issues
show
Documentation Bug introduced by
The method save does not exist on object<ThumbBase>? Since you implemented __call, maybe consider adding a @method annotation.

If you implement __call and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.

This is often the case, when __call is implemented by a parent class and only the child class knows which methods exist:

class ParentClass {
    private $data = array();

    public function __call($method, array $args) {
        if (0 === strpos($method, 'get')) {
            return $this->data[strtolower(substr($method, 3))];
        }

        throw new \LogicException(sprintf('Unsupported method: %s', $method));
    }
}

/**
 * If this class knows which fields exist, you can specify the methods here:
 *
 * @method string getName()
 */
class SomeClass extends ParentClass { }
Loading history...
112 1
            return $this;
113
    }
114
115
    /**
116
     * Renders this image.
117
     * @return EThumbnail
118
     */
119
    public function show()
120
    {
121
            $this->_thumbnail=$this->_thumbnail->show();
0 ignored issues
show
Documentation Bug introduced by
The method show does not exist on object<ThumbBase>? Since you implemented __call, maybe consider adding a @method annotation.

If you implement __call and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.

This is often the case, when __call is implemented by a parent class and only the child class knows which methods exist:

class ParentClass {
    private $data = array();

    public function __call($method, array $args) {
        if (0 === strpos($method, 'get')) {
            return $this->data[strtolower(substr($method, 3))];
        }

        throw new \LogicException(sprintf('Unsupported method: %s', $method));
    }
}

/**
 * If this class knows which fields exist, you can specify the methods here:
 *
 * @method string getName()
 */
class SomeClass extends ParentClass { }
Loading history...
122
            return $this;
123
    }
124
125
    /**
126
     * Returns the Working Image as a String
127
     * @return string
128
     */
129 1
    public function getImageAsString()
130
    {
131 1
            return $this->_thumbnail->getImageAsString();
0 ignored issues
show
Documentation Bug introduced by
The method getImageAsString does not exist on object<ThumbBase>? Since you implemented __call, maybe consider adding a @method annotation.

If you implement __call and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.

This is often the case, when __call is implemented by a parent class and only the child class knows which methods exist:

class ParentClass {
    private $data = array();

    public function __call($method, array $args) {
        if (0 === strpos($method, 'get')) {
            return $this->data[strtolower(substr($method, 3))];
        }

        throw new \LogicException(sprintf('Unsupported method: %s', $method));
    }
}

/**
 * If this class knows which fields exist, you can specify the methods here:
 *
 * @method string getName()
 */
class SomeClass extends ParentClass { }
Loading history...
132
    }
133
134
  /**
135
   * Add watermark to Image
136
   *
137
   * @param $wm
138
   * @param $pos
139
   * @param $opacity
140
   * @param $offsetX
141
   * @param $offsetY
142
   *
143
   * @return EThumbnail
144
   */
145
    public function addWatermark($wm, $pos, $opacity, $offsetX, $offsetY)
146
    {
147
            $this->_thumbnail=$this->_thumbnail->addWatermark($wm->_thumbnail, $pos, $opacity, $offsetX, $offsetY);
0 ignored issues
show
Documentation Bug introduced by
The method addWatermark does not exist on object<ThumbBase>? Since you implemented __call, maybe consider adding a @method annotation.

If you implement __call and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.

This is often the case, when __call is implemented by a parent class and only the child class knows which methods exist:

class ParentClass {
    private $data = array();

    public function __call($method, array $args) {
        if (0 === strpos($method, 'get')) {
            return $this->data[strtolower(substr($method, 3))];
        }

        throw new \LogicException(sprintf('Unsupported method: %s', $method));
    }
}

/**
 * If this class knows which fields exist, you can specify the methods here:
 *
 * @method string getName()
 */
class SomeClass extends ParentClass { }
Loading history...
148
            return $this;
149
    }
150
}
151
?>
0 ignored issues
show
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...
152