Showing 1,049 of 26,336 total issues
Function get_vtimezones_str
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function get_vtimezones_str($timezones)
{
if (empty($timezones)) {
return "BEGIN:VTIMEZONE\r
TZID:GMT\r
- 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 gif_getSize
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function gif_getSize($gif, &$width, &$height)
{
if (isset($gif) && (@get_class($gif) == 'cgif') && $gif->loaded()) {
$width = $gif->width();
$height = $gif->height();
- 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 matchPath
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function matchPath($path, $allowed_dirs)
{
if (!empty($allowed_dirs)) {
foreach ($allowed_dirs as $one_dir) {
if (preg_match('#^' . preg_quote(str_replace(DIRECTORY_SEPARATOR, '/', $this->realPathSafe($one_dir))) . '#', $path)) {
- 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 phpThumbDebugVarDump
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function phpThumbDebugVarDump($var)
{
if (is_null($var)) {
return 'NULL';
} elseif (is_bool($var)) {
- 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 skipExt
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function skipExt(&$data, &$extLen)
{
$extLen = 0;
$b = ord($data{0});
- 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 gif_loadFileToGDimageResource
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function gif_loadFileToGDimageResource($gifFilename, $bgColor = -1)
{
if ($gif = gif_loadFile($gifFilename)) {
if (!phpthumb_functions::FunctionIsDisabled('set_time_limit')) {
// shouldn't take nearly this long
- 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 ApacheLookupURIarray
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function ApacheLookupURIarray($filename)
{
// apache_lookup_uri() only works when PHP is installed as an Apache module.
if (php_sapi_name() == 'apache') {
//$property_exists_exists = function_exists('property_exists');
- 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 SourceTransparentColorMask
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function SourceTransparentColorMask(&$gdimg, $hexcolor, $min_limit = 5, $max_limit = 10)
{
$width = imagesx($gdimg);
$height = imagesy($gdimg);
if ($gdimg_mask = imagecreatetruecolor($width, $height)) {
- 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 Ellipse
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function Ellipse($gdimg)
{
if (phpthumb_functions::gd_version() < 2) {
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"