Showing 9,653 of 9,653 total issues
The parameter $in_cropY is not named in camelCase. Open
public function crop($in_cropWidth, $in_cropHeight, $in_cropX, $in_cropY)
{
// Sanity check
if (!$this->_intersects($in_cropWidth, $in_cropHeight, $in_cropX, $in_cropY)) {
return PEAR::raiseError('Nothing to crop', IMAGE_TRANSFORM_ERROR_OUTOFBOUND);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The property $lib_path is not named in camelCase. Open
class Image_Transform
{
/**
* Name of the image file
* @var string
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The parameter $new_size is not named in camelCase. Open
public function _parse_size($new_size, $old_size)
{
if ('%' == mb_substr($new_size, -1)) {
$new_size = mb_substr($new_size, 0, -1);
$new_size = $new_size / 100;
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The class Image_Transform_Driver_IM is not named in CamelCase. Open
class Image_Transform_Driver_IM extends Image_Transform
{
/**
* associative array commands to be executed
* @var array
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
Avoid variables with short names like $y. Configured minimum length is 3. Open
'primitive' => "text $x,$y " . $text,
- Read upRead up
- Exclude checks
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
The parameter $in_cropHeight is not named in camelCase. Open
public function crop($in_cropWidth, $in_cropHeight, $in_cropX, $in_cropY)
{
// Sanity check
if (!$this->_intersects($in_cropWidth, $in_cropHeight, $in_cropX, $in_cropY)) {
return PEAR::raiseError('Nothing to crop', IMAGE_TRANSFORM_ERROR_OUTOFBOUND);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $new_y is not named in camelCase. Open
public function _resize($new_x, $new_y, $options = null)
{
if (isset($this->command['resize'])) {
return PEAR::raiseError('You cannot scale or resize an image more than once without calling save() or display()', true);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $new_x is not named in camelCase. Open
public function _resize($new_x, $new_y)
{
$img2 = imagick_copy_resize($this->imageHandle, $new_x, $new_y, IMAGICK_FILTER_CUBIC, 1);
if ($img2) {
$this->oldImage = $this->imageHandle;
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The class Image_Transform_Driver_Imagick2 is not named in CamelCase. Open
class Image_Transform_Driver_Imagick2 extends Image_Transform
{
/**
* Handler of the imagick image ressource
* @var array
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
The property $_programs is not named in camelCase. Open
class Image_Transform
{
/**
* Name of the image file
* @var string
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The parameter $new_x is not named in camelCase. Open
public function resize($new_x = 0, $new_y = 0, $options = null)
{
// 0 means keep original size
$new_x = (0 == $new_x) ? $this->img_x : $this->_parse_size($new_x, $this->img_x);
$new_y = (0 == $new_y) ? $this->img_y : $this->_parse_size($new_y, $this->img_y);
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $new_x is not named in camelCase. Open
public function scaleByXY($new_x = 0, $new_y = 0, $options = null)
{
return $this->resize($new_x, $new_y, $options);
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The class Image_Transform_Driver_Imagick is not named in CamelCase. Open
class Image_Transform_Driver_Imagick extends Image_Transform
{
/**
* Handler of the imagick image ressource
* @var array
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
Avoid variables with short names like $x. Configured minimum length is 3. Open
public function crop($width, $height, $x = 0, $y = 0)
- Read upRead up
- Exclude checks
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 $y. Configured minimum length is 3. Open
imlib_text_draw($this->imageHandle, $fontResource, $x, $y, $text, $angle, $color[0], $color[1], $color[2], 255);
- Read upRead up
- Exclude checks
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 $x. Configured minimum length is 3. Open
public function crop($width, $height, $x = 0, $y = 0)
- Read upRead up
- Exclude checks
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
The property $_options is not named in camelCase. Open
class Image_Transform
{
/**
* Name of the image file
* @var string
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
Avoid variables with short names like $y. Configured minimum length is 3. Open
public function crop($width, $height, $x = 0, $y = 0)
- Read upRead up
- Exclude checks
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
The parameter $new_x is not named in camelCase. Open
public function _resize($new_x, $new_y, $options = null)
{
try {
$scaleMethod = $this->_getOption('scaleMethod', $options, 'smooth');
$blur = ('pixel' == $scaleMethod) ? 0 : 1;
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The property $default_text_params is not named in camelCase. Open
class Image_Transform
{
/**
* Name of the image file
* @var string
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}