Showing 7 of 7 total issues
Resources
has 102 functions (exceeds 20 allowed). Consider refactoring. Open
Open
final class Resources implements IResources
{
/** @var IClient */
private $restClient;
File Resources.php
has 543 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
*
*
* @author Roman Piták <roman@pitak.net>
Method getProperties
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getProperties()
{
return array(
'DateSent' => 'XsDateTime',
'NumUniqueOpens' => 'XsInt',
Method execute
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute($param_arr, $responses = array())
{
// when only url is supplied
if (is_string($param_arr)) {
Function __construct
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
public function __construct($value = null)
{
// if value is supplied
if (!is_null($value)) {
if (!is_array($value)) { // convert to array
- 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
Method GetAddressBookContactsModifiedSinceDate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function GetAddressBookContactsModifiedSinceDate($addressBookId, $date, $withFullData = false, $select = 1000, $skip = 0);
Method GetAddressBookContactsModifiedSinceDate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function GetAddressBookContactsModifiedSinceDate($addressBookId, $date, $withFullData = false, $select = 1000, $skip = 0)