Showing 7 of 7 total issues
Method saveUrl
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function saveUrl($url)
{
$this->logger->info("saving url: $url");
$url = parse_url($url);
$host = 'ssl://' . $url['host'];
Method processRequest
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function processRequest()
{
// config
$conf = include('you2better-conf.php');
Function saveUrl
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
private function saveUrl($url)
{
$this->logger->info("saving url: $url");
$url = parse_url($url);
$host = 'ssl://' . $url['host'];
- 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 checkFileSize
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
private function checkFileSize($cacheFilenameHeader, $cacheFilenameContent)
{
$ret = false;
if (($fd = fopen($cacheFilenameHeader, 'r')) !== false) {
while (!feof($fd)) {
- 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 processRequest
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function processRequest()
{
// config
$conf = include('you2better-conf.php');
- 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 getRange
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
static public function getRange($totalLength)
{
global $_SERVER;
if (isset($_SERVER['HTTP_RANGE'])) {
if (null === self::$_range) {
- 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 checkFileSize
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function checkFileSize($cacheFilenameHeader, $cacheFilenameContent)
{
$ret = false;
if (($fd = fopen($cacheFilenameHeader, 'r')) !== false) {
while (!feof($fd)) {