Function perform
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
public function perform($url, $lastModTime = null, $redirTries = 0)
{
SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
/*
- 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 perform
has 117 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function perform($url, $lastModTime = null, $redirTries = 0)
{
SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
/*
File Services_Providers_Http.php
has 303 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
class Services_Providers_Http
{
private $_cacheDao;
Services_Providers_Http
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
class Services_Providers_Http
{
private $_cacheDao;
/**
Function addPostFieldsToCurl
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
private function addPostFieldsToCurl($ch, $postFields, $files, $rawPostData)
{
/*
* Files posted to another webserver, need to be in another format
* than a plain post data to be posted.
- 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
Function performCachedGet
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function performCachedGet($url, $storeWhenRedirected, $ttl = 900)
{
SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
$url_md5 = md5($url);
- 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 addPostFieldsToCurl
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function addPostFieldsToCurl($ch, $postFields, $files, $rawPostData)
{
/*
* Files posted to another webserver, need to be in another format
* than a plain post data to be posted.
Method performCachedGet
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function performCachedGet($url, $storeWhenRedirected, $ttl = 900)
{
SpotTiming::start(__CLASS__.'::'.__FUNCTION__);
$url_md5 = md5($url);