Showing 26,336 of 26,336 total issues
Avoid variables with short names like $bg. Configured minimum length is 3. Open
$bg = null,
- 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 $b. Configured minimum length is 3. Open
$b = round($amountPct * hexdec(substr($targetColor, 4, 2)));
- 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 $radius_y is not named in camelCase. Open
public function RoundedImageCorners(&$gdimg, $radius_x, $radius_y)
{
// generate mask at twice desired resolution and downsample afterwards for easy antialiasing
// mask is generated as a white double-size ellipse on a triple-size black background and copy-paste-resampled
// onto a correct-size mask image as 4 corners due to errors when the entire mask is resampled at once (gray edges)
- 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
Avoid variables with short names like $r. Configured minimum length is 3. Open
$r = round($amountPct * hexdec(substr($targetColor, 0, 2)));
- 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 $border_width is not named in camelCase. Open
public function ImageBorder(&$gdimg, $border_width, $radius_x, $radius_y, $hexcolor_border)
{
$border_width = ($border_width ?: 1);
$radius_x = ($radius_x ?: 0);
$radius_y = ($radius_y ?: 0);
- 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 $rotate_angle is not named in camelCase. Open
public static function ImprovedImageRotate(
&$gdimg_source,
$rotate_angle = 0,
$config_background_hexcolor = 'FFFFFF',
$bg = null,
- 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 $config_background_hexcolor is not named in camelCase. Open
public static function ImprovedImageRotate(
&$gdimg_source,
$rotate_angle = 0,
$config_background_hexcolor = 'FFFFFF',
$bg = null,
- 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 $radius_x is not named in camelCase. Open
public function RoundedImageCorners(&$gdimg, $radius_x, $radius_y)
{
// generate mask at twice desired resolution and downsample afterwards for easy antialiasing
// mask is generated as a white double-size ellipse on a triple-size black background and copy-paste-resampled
// onto a correct-size mask image as 4 corners due to errors when the entire mask is resampled at once (gray edges)
- 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 $radius_x is not named in camelCase. Open
public function ImageBorder(&$gdimg, $border_width, $radius_x, $radius_y, $hexcolor_border)
{
$border_width = ($border_width ?: 1);
$radius_x = ($radius_x ?: 0);
$radius_y = ($radius_y ?: 0);
- 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 $margin_x is not named in camelCase. Open
public function HistogramOverlay(
&$gdimg,
$bands = '*',
$colors = '',
$width = 0.25,
- 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 $hexcolor_border is not named in camelCase. Open
public function ImageBorder(&$gdimg, $border_width, $radius_x, $radius_y, $hexcolor_border)
{
$border_width = ($border_width ?: 1);
$radius_x = ($radius_x ?: 0);
$radius_y = ($radius_y ?: 0);
- 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
Avoid variables with short names like $g. Configured minimum length is 3. Open
$g = round($amountPct * hexdec(substr($targetColor, 2, 2)));
- 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 $margin_y is not named in camelCase. Open
public function HistogramOverlay(
&$gdimg,
$bands = '*',
$colors = '',
$width = 0.25,
- 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 $radius_y is not named in camelCase. Open
public function ImageBorder(&$gdimg, $border_width, $radius_x, $radius_y, $hexcolor_border)
{
$border_width = ($border_width ?: 1);
$radius_x = ($radius_x ?: 0);
$radius_y = ($radius_y ?: 0);
- 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 $gdimg_source is not named in camelCase. Open
public static function ImprovedImageRotate(
&$gdimg_source,
$rotate_angle = 0,
$config_background_hexcolor = 'FFFFFF',
$bg = null,
- 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 $min_limit is not named in camelCase. Open
public function SourceTransparentColorMask(&$gdimg, $hexcolor, $min_limit = 5, $max_limit = 10)
{
$width = imagesx($gdimg);
$height = imagesy($gdimg);
if ($gdimg_mask = imagecreatetruecolor($width, $height)) {
- 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
Avoid variables with short names like $R. Configured minimum length is 3. Open
public static function ImageColorAllocateAlphaSafe(&$gdimg_hexcolorallocate, $R, $G, $B, $alpha = false)
- 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 $R. Configured minimum length is 3. Open
$R = hexdec(substr($hexcolor, 0, 2));
- 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 $gdimg_dest is not named in camelCase. Open
public function WatermarkOverlay(
&$gdimg_dest,
&$img_watermark,
$alignment = '*',
$opacity = 50,
- 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
Avoid variables with short names like $x2. Configured minimum length is 3. Open
$x2 = $text_origin_x + $min_x + $text_width;
- 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;
}
}
}