core/RouteInfo.php
RouteInfo
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class RouteInfo
{
private $routeType;
private $requestMethod;
private $url;
Method __construct
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$routeType,
$requestMethod,
$url,
$component,
$controller,
The method __construct has 10 parameters. Consider reducing the number of parameters to less than 10. Open
Open
public function __construct(
$routeType,
$requestMethod,
$url,
$component,
- Exclude checks
The 'getCheckAntiCSRFToken()' method which returns a boolean should be named 'is...()' or 'has...()' Open
Open
public function getCheckAntiCSRFToken()
{
return !isset($this->checkAntiCSRFToken) ? false : $this->checkAntiCSRFToken;
}
- Read upRead up
- Exclude checks
BooleanGetMethodName
Since: 0.2
Looks for methods named 'getX()' with 'boolean' as the return type. The convention is to name these methods 'isX()' or 'hasX()'.
Example
class Foo {
/**
* @return boolean
*/
public function getFoo() {} // bad
/**
* @return bool
*/
public function isFoo(); // ok
/**
* @return boolean
*/
public function getFoo($bar); // ok, unless checkParameterizedMethods=true
}