src/Api/Providers/Boards.php
Avoid excessively long variable names like $nameWithRemovedSpaces. Keep variable name length under 20. Open
Open
$nameWithRemovedSpaces = str_replace(' ', '-', $board);
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Avoid using short method names like Boards::my(). The configured minimum method name length is 3. Open
Open
public function my()
{
return $this->forMe();
}
- Read upRead up
- Exclude checks
ShortMethodName
Since: 0.2
Detects when very short method names are used.
Example
class ShortMethod {
public function a( $index ) { // Violation
}
}
Source https://phpmd.org/rules/naming.html#shortmethodname
Only one argument is allowed per line in a multi-line function call Open
Open
], $attributes
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
UrlBuilder::RESOURCE_GET_BOARD_FEED, ['board_id' => $boardId], $limit
- Exclude checks
Only one argument is allowed per line in a multi-line function call Open
Open
UrlBuilder::RESOURCE_GET_BOARD_FEED, ['board_id' => $boardId], $limit
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
Open
return function_exists('mb_strtolower') ? mb_strtolower($nameWithRemovedSpaces) : strtolower($nameWithRemovedSpaces);
- Exclude checks