Showing 113 of 1,244 total issues
File log.php
has 961 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
You may not change or alter any portion of this comment or credits
of supporting developers from this source code or any supporting source code
which is considered copyrighted (c) material of the original comment or credit authors.
Function getLogsFromFiles
has a Cognitive Complexity of 103 (exceeds 5 allowed). Consider refactoring. Open
public function getLogsFromFiles(
$log_files = [],
$limit = 0,
$start = 0,
$options = null,
- 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
File Browscap.php
has 825 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace phpbrowscap;
use Exception as BaseException;
Method getOptions
has 227 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getOptions($option = null, $V = 'value')
{
$V = strtolower($V);
if ($this->userlog->getUser()) {
Function validate
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
function validate(elName, elType, prevent, disablecat, elMsg) {
var i = 0;
var el = document.getElementsByName(elName);
var is_valid = true;
switch (elType) {
- 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 getBrowser
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
public function getBrowser($user_agent = null, $return_array = false)
{
if ($this->shouldCacheBeUpdated()) {
try {
$this->updateCache();
- 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
File setting.php
has 449 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
You may not change or alter any portion of this comment or credits
of supporting developers from this source code or any supporting source code
which is considered copyrighted (c) material of the original comment or credit authors.
File xoops_version.php
has 384 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
You may not change or alter any portion of this comment or credits
of supporting developers from this source code or any supporting source code
which is considered copyrighted (c) material of the original comment or credit authors.
Function getViews
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function getViews(
$limit = 10,
$start = 0,
$sort = 'count',
$order = 'DESC',
- 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
File stats.php
has 367 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
You may not change or alter any portion of this comment or credits
of supporting developers from this source code or any supporting source code
which is considered copyrighted (c) material of the original comment or credit authors.
Function getLogsCounts
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function getLogsCounts($criteria = null, $fields = null, $asObject = true, $id_as_key = true)
{
if (is_array($fields) && count($fields) > 0) {
if (!in_array($this->keyName, $fields)) {
$fields[] = $this->keyName;
- 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 updateAll
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function updateAll($type = 'log', $prob = 11)
{
if (!$this->userlog->probCheck($prob)) {
return false;
}
- 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 getLogsFromFiles
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getLogsFromFiles(
$log_files = [],
$limit = 0,
$start = 0,
$options = null,
Function createCacheNewWay
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
protected function createCacheNewWay($iniContent)
{
$patternPositions = [];
// get all patterns from the ini file in the correct order,
- 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 createCacheNewWay
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function createCacheNewWay($iniContent)
{
$patternPositions = [];
// get all patterns from the ini file in the correct order,
Method getViews
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getViews(
$limit = 10,
$start = 0,
$sort = 'count',
$order = 'DESC',
Method updateAll
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateAll($type = 'log', $prob = 11)
{
if (!$this->userlog->probCheck($prob)) {
return false;
}
Function _getRemoteData
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
protected function _getRemoteData($url)
{
ini_set('user_agent', $this->_getUserAgent());
switch ($this->_getUpdateMethod()) {
- 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 getBrowser
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getBrowser($user_agent = null, $return_array = false)
{
if ($this->shouldCacheBeUpdated()) {
try {
$this->updateCache();
Browscap
has 28 functions (exceeds 20 allowed). Consider refactoring. Open
class Browscap
{
/**
* Current version of the class.
*/