Showing 26,336 of 26,336 total issues
Avoid variables with short names like $ex. Configured minimum length is 3. Open
$ex = empty($plugin_returns[$date]) ? array() : array_slice($plugin_returns[$date], 0, $gifaday);
- 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 $_header is not named in camelCase. Open
class APCalAdminMenuHandler
{
/**
*
* @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 $user_uri is not named in camelCase. Open
public function import_ics_via_fopen($uri, $force_http = true, $user_uri = '')
{
$user_uri = empty($user_uri) ? '' : $uri;
// changing webcal://* to http://*
$uri = str_replace('webcal://', 'http://', $uri);
- 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 $tz_array is not named in camelCase. Open
class iCal_parser
{
public $week_start_day = 'Sunday';
public $timezone = '+0900';
public $events = array();
- 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 property $_obj is not named in camelCase. Open
class APCalAdminMenuHandler
{
/**
*
* @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 class cssParser is not named in CamelCase. Open
class cssParser
{
public $_css = '';
/**
- 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 parameter $for_coming is not named in camelCase. Open
public function get_blockarray_coming_event($get_target = '', $num = 5, $for_coming = false, $untildays = 0)
{
// if( $get_target == '' ) $get_target = $_SERVER['SCRIPT_NAME'] ;
$now = $for_coming ? time() : $this->unixtime + $this->day_start;
- 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 $get_target is not named in camelCase. Open
public function assign_event_list(&$tpl, $get_target = '')
{
$pos = isset($_GET['pos']) ? (int)$_GET['pos'] : 0;
$num = isset($_GET['num']) ? (int)$_GET['num'] : 20;
- 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 $week_start_day is not named in camelCase. Open
class iCal_parser
{
public $week_start_day = 'Sunday';
public $timezone = '+0900';
public $events = array();
- 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 $Ymd is not named in camelCase. Open
public function dateOfWeek($Ymd, $day)
{
if (!isset($this->week_start_day)) {
$this->week_start_day = 'Sunday';
}
- 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 $db. Configured minimum length is 3. Open
$db = XoopsDatabaseFactory::getDatabaseConnection();
- 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 $_subheader is not named in camelCase. Open
class APCalAdminMenuHandler
{
/**
*
* @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 $i. Configured minimum length is 3. Open
$i = 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 $_css is not named in camelCase. Open
class cssParser
{
public $_css = '';
/**
- 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 property $_menutabs is not named in camelCase. Open
class APCalAdminMenuHandler
{
/**
*
* @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 property $date_long_names is not named in camelCase. Open
class apcal_locale
{
public $hour_names_24;
public $hour_names_12;
public $holidays;
- 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 property $hour_names_24 is not named in camelCase. Open
class apcal_locale
{
public $hour_names_24;
public $hour_names_12;
public $holidays;
- 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 property $hour_names_12 is not named in camelCase. Open
class apcal_locale
{
public $hour_names_24;
public $hour_names_12;
public $holidays;
- 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 $gd_image is not named in camelCase. Open
public function GD2BMPstring(&$gd_image)
{
$imageX = imagesx($gd_image);
$imageY = imagesy($gd_image);
- 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 $ExtractData is not named in camelCase. Open
public function getid3_bmp(&$BMPdata, &$ThisFileInfo, $ExtractPalette = false, $ExtractData = false)
{
// shortcuts
$ThisFileInfo['bmp']['header']['raw'] = array();
- 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) {
}
}