Showing 1,940 of 1,940 total issues
The parameter $path_or_array is not named in camelCase. Open
function dispatch_patch($path_or_array, $callback, $options = array())
{
route("PATCH", $path_or_array, $callback, $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
Avoid variables with short names like $p. Configured minimum length is 3. Open
$p = explode('/',$param);
- 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 $fh. Configured minimum length is 3. Open
$fh = fopen($file, 'w') or die("can't open file");
- 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 $output_as_html is not named in camelCase. Open
function debug($var, $output_as_html = true)
{
if ( is_null($var) ) { return '<span class="null-value">[NULL]</span>'; };
$out = '';
switch ($var)
- 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 $path_or_array is not named in camelCase. Open
function dispatch_delete($path_or_array, $callback, $options = array())
{
route("DELETE", $path_or_array, $callback, $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 parameter $max_items is not named in camelCase. Open
function Delete_Oldest_rss($max_items='20')
{
$new_rss = RSS_header();
$item_count = 0;
$rss = Load_RSS_data();
- 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 $path_or_array is not named in camelCase. Open
function dispatch_post($path_or_array, $callback, $options = array())
{
route("POST", $path_or_array, $callback, $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 parameter $post_data is not named in camelCase. Open
function test_request($url, $method="GET", $include_header=false, $post_data=array(), $http_header=array()) {
$method = strtoupper($method);
$allowed_methods = array("GET", "PUT", "POST", "DELETE", "HEAD");
if(!in_array($method, $allowed_methods))
{
- 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 $fs. Configured minimum length is 3. Open
if(false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) {
- 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 $name_or_array_or_null is not named in camelCase. Open
function params($name_or_array_or_null = null, $value = null)
{
static $params = array();
$args = func_get_args();
- 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 $is_valid is not named in camelCase. Open
class ReCaptchaResponse
{
var $is_valid;
var $error;
}
- 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 $m. Configured minimum length is 3. Open
function request_method_is_allowed($m = 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
The parameter $prevents_output is not named in camelCase. Open
function require_once_dir($path, $pattern = "*.php", $prevents_output = true)
{
if($path[strlen($path) - 1] != "/") $path .= "/";
$filenames = glob($path.$pattern);
if(!is_array($filenames)) $filenames = 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) {
}
}
Source
The parameter $path_or_array is not named in camelCase. Open
function dispatch_put($path_or_array, $callback, $options = array())
{
route("PUT", $path_or_array, $callback, $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
Avoid variables with short names like $a. Configured minimum length is 3. Open
$a = array_fill(0, $n_names - $n_matches, 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 $k. Configured minimum length is 3. Open
list($k, $v) = explode('=', $param);
- 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 $path_or_array is not named in camelCase. Open
function dispatch($path_or_array, $callback, $options = array())
{
dispatch_get($path_or_array, $callback, $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 parameter $function_or_file is not named in camelCase. Open
function layout($function_or_file = null)
{
static $layout = null;
if(func_num_args() > 0) $layout = $function_or_file;
return $layout;
- 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 $quote_style is not named in camelCase. Open
function limonade_htmlspecialchars_decode($string, $quote_style = ENT_COMPAT)
{
$table = array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style));
if($quote_style === ENT_QUOTES)
$table['''] = $table['''] = '\'';
- 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 = http_response_status($num);
- 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;
}
}
}