Showing 668 of 850 total issues
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return Logger::NOTICE;
Avoid too many return
statements within this method. Open
case UPLOAD_ERR_EXTENSION: return 'Some PHP extension interfered with uploaded, please check your server config';
Avoid too many return
statements within this method. Open
return $spot;
Avoid too many return
statements within this method. Open
default: return 'unk: '.$_FILES[$this->_formName]['error'][$this->_fieldName];
Avoid too many return
statements within this method. Open
case UPLOAD_ERR_CANT_WRITE: return 'Failed to write uploaded file to disk, please check your server config';
Avoid too many return
statements within this method. Open
return $spot;
Avoid too many return
statements within this method. Open
return;
Function downloadSabnzbd
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function downloadSabnzbd(id,url, dltype) {
$(".sab_"+id).removeClass("succes").addClass("loading");
/*
* Get the URL, do not rely on the result handler always
- 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 isXsrfValid
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function isXsrfValid($form)
{
if (!isset($_POST[$form]['xsrfid'])) {
return false;
} // if
- 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 render
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function render()
{
$tplHelper = $this->_tplHelper;
/* Make sure users has sufficient permission to perform this action */
- 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 connect
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function connect($host, $user, $pass, $db, $port, $schema)
{
if (!$this->_conn instanceof PDO) {
if ($host[0] === '/') {
$db_conn = 'unix_socket='.$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 fetchFullSpot
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function fetchFullSpot($msgId, $ourUserId)
{
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
Function Cat2Desc
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function Cat2Desc($hcat, $cat)
{
$catList = explode('|', $cat);
$cat = $catList[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 convertBmpImageStringToJpeg
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function convertBmpImageStringToJpeg($imageString, $dimensions)
{
/*
* If this fil is currently an BMP, change it to an
* JPG file
- 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 arrayKeyToInForComments
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function arrayKeyToInForComments($ar)
{
$tmpList = '';
if (!is_array($ar) || count($ar) == 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 getFullSpot
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getFullSpot(array $currentSession, $msgId, $markAsRead)
{
// Make sure user has access to the spot
$this->_spotSec->fatalPermCheck(SpotSecurity::spotsec_view_spotdetail, '');
- 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 time_ago
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function time_ago($date, $granularity = 2)
{
$difference = time() - $date;
$periods = ['decade' => 315360000,
'year' => 31536000,
- 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 translateMultiple
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function translateMultiple($dstLanguage, $list, $field)
{
/*
* Try to obtain an translator token
*/
- 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 retrieveInfo
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function retrieveInfo()
{
$mediaInfo = new Dto_MediaInformation();
$mediaInfo->setValid(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"