Showing 119 of 119 total issues
The first parameter of a multi-line function declaration must be on the line after the opening bracket Open
Open
public static function validateLength($paramName, array $data,
- Exclude checks
The first parameter of a multi-line function declaration must be on the line after the opening bracket Open
Open
public static function recursiveArraySearch($needleKey, $needleValue,
- Exclude checks
Multi-line function declaration not indented correctly; expected 8 spaces but found 38 Open
Open
array $params = array(),
- Exclude checks
The closing parenthesis of a multi-line function declaration must be on a new line Open
Open
array &$haystack)
- 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
The first parameter of a multi-line function declaration must be on the line after the opening bracket Open
Open
public static function functionDI(\Closure $function,
- 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 declaration not indented correctly; expected 8 spaces but found 44 Open
Open
array $params = [])
- Exclude checks
Multi-line function declaration not indented correctly; expected 8 spaces but found 42 Open
Open
array $params = [])
- 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
TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE" Open
Open
$result = json_decode($json, TRUE);
- Exclude checks
The first parameter of a multi-line function declaration must be on the line after the opening bracket Open
Open
public static function constructObject($className,
- Exclude checks
The closing parenthesis of a multi-line function declaration must be on a new line Open
Open
array $constructorArguments = [])
- Exclude checks
Function array2XML
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
public static function array2XML($haystack, $rootElementName = '')
{
$args = func_get_args();
$isRoot = !isset($args[2]);
$root = isset($args[3]) ? $args[3] : new \DOMDocument('1.0', 'utf-8');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Multi-line function declaration not indented correctly; expected 8 spaces but found 47 Open
Open
array &$haystack)
- Exclude checks
Multi-line function declaration not indented correctly; expected 8 spaces but found 38 Open
Open
array $options = array())
- 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
Function methodDI
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
public static function methodDI(array $objectInfo, \Closure $callback = null)
{
$reflection = new \ReflectionObject($objectInfo[0]);
$methods = $reflection->getMethods();
$inputParams = [];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line Open
Open
{
- Exclude checks
The first parameter of a multi-line function declaration must be on the line after the opening bracket Open
Open
public static function sendPost($_url, $_data, $_headers = [],
- Exclude checks