Showing 119 of 119 total issues
The parameter $_url is not named in camelCase. Open
Open
public static function sendPost($_url, $_data, $_headers = [],
$_return_header = true)
{
return self::sendCurl($_url,
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 $_data is not named in camelCase. Open
Open
public static function sendPost($_url, $_data, $_headers = [],
$_return_header = true)
{
return self::sendCurl($_url,
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 $_headers is not named in camelCase. Open
Open
public static function sendPost($_url, $_data, $_headers = [],
$_return_header = true)
{
return self::sendCurl($_url,
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 $_params is not named in camelCase. Open
Open
public static function sendCurl($_url, $_params)
{
$Curl = curl_init();
$_params[CURLOPT_URL] = $_url;
curl_setopt_array($Curl, $_params);
- 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 $id. Configured minimum length is 3. Open
Open
$id = $data[$groupField];
- 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 $o. Configured minimum length is 3. Open
Open
public static function toArray($o)
- 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 is not named in camelCase. Open
Open
public static function isAbsoluteUrl($_path)
{
$url = parse_url($_path);
return $url !== false && isset($url['scheme']) && $url['scheme'] != '';
- 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 $_return_header is not named in camelCase. Open
Open
public static function sendPost($_url, $_data, $_headers = [],
$_return_header = true)
{
return self::sendCurl($_url,
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 $_url is not named in camelCase. Open
Open
public static function sendCurl($_url, $_params)
{
$Curl = curl_init();
$_params[CURLOPT_URL] = $_url;
curl_setopt_array($Curl, $_params);
- 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
Multi-line function declarations must define one parameter per line Open
Open
public static function validateLength($paramName, array $data,
- Exclude checks
Multi-line function declaration not indented correctly; expected 8 spaces but found 48 Open
Open
array $haystack)
- Exclude checks
Multi-line function declarations must define one parameter per line Open
Open
public static function sendPost($_url, $_data, $_headers = [],
- Exclude checks
The closing parenthesis of a multi-line function declaration must be on a new line Open
Open
\Closure $callback = null)
- Exclude checks
Multi-line function declaration not indented correctly; expected 8 spaces but found 43 Open
Open
array $constructorArguments = [])
- Exclude checks
The closing parenthesis of a multi-line function declaration must be on a new line Open
Open
array $params = [])
- Exclude checks
Multi-line function declarations must define one parameter per line Open
Open
public static function validateEquality($paramName, array $data,
- Exclude checks
The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line Open
Open
{
- Exclude checks
Multi-line function declarations must define one parameter per line Open
Open
public static function recursivelySetValue($needleKey, $needleValue,
- Exclude checks
Multi-line function declarations must define one parameter per line Open
Open
public static function sendPost($_url, $_data, $_headers = [],
- Exclude checks
The closing parenthesis of a multi-line function declaration must be on a new line Open
Open
$_return_header = true)
- Exclude checks