Showing 355 of 3,032 total issues
Method tryBrowserCache
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function tryBrowserCache()
{
if (BROWSER_CACHE_DISABLE) {
$this->debug(3, 'Browser caching is disabled');
Method rtsp
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function rtsp(&$patterns, &$replacements): void
{
$patterns[] = "/\[rtsp=(['\"]?)([^\"']*),([^\"']*)\\1]([^\"]*)\[\/rtsp\]/sU";
$rp = "<object classid=\"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA\" HEIGHT='\\3' ID=Player WIDTH='\\2' VIEWASTEXT>";
$rp .= '<param NAME="_ExtentX" VALUE="12726">';
Function handleErrors
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected function handleErrors()
{
if ($this->haveErrors()) {
if (NOT_FOUND_IMAGE && $this->is404()) {
if ($this->serveImg(NOT_FOUND_IMAGE)) {
- 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 xcopy
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static function xcopy($source, $dest)
{
// Check for symlinks
if (\is_link($source)) {
return \symlink(\readlink($source), $dest);
- 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 isBlockCloned
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function isBlockCloned(int $bid, string $bside, string $bweight, string $bvisible, string $bcachetime, ?array $bmodule, ?array $options, ?array $groups): void
{
\xoops_loadLanguage('admin', 'system');
\xoops_loadLanguage('admin/blocksadmin', 'system');
\xoops_loadLanguage('admin/groups', 'system');
- 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 copyr
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static function copyr($source, $dest)
{
// Simple copy for a file
if (\is_file($source)) {
return \copy($source, $dest);
- 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 getCategoryPath
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function getCategoryPath($withAllLink = true)
{
if (empty($this->categoryPath)) {
if ($withAllLink) {
$ret = $this->getCategoryLink();
- 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 getCategoriesCount
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function getCategoriesCount($parentid = 0)
{
if (-1 == $parentid) {
return $this->getCount();
}
- 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 12 (exceeds 5 allowed). Consider refactoring. Open
public function render()
{
$ret = '<table border="0" width="100%">' . NWLINE;
foreach ($this->getElements() as $ele) {
if (!$ele->isHidden()) {
- 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 orderBlock
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function orderBlock(
array $bid,
array $oldtitle,
array $oldside,
array $oldweight,
Method getBody
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getBody($maxLength = 0, $format = 'S', $stripTags = '')
{
$ret = $this->getVar('body', $format);
$wrapPos = \mb_strpos($ret, self::PAGEWRAP);
if (!(false === $wrapPos)) {
Method publisher_date_to_date_show
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function publisher_date_to_date_show($options)
{
$myts = \MyTextSanitizer::getInstance();
$helper = Helper::getInstance();
Method publisher_items_recent_edit
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function publisher_items_recent_edit($options)
{
// require_once PUBLISHER_ROOT_PATH . '/class/blockform.php';
xoops_load('XoopsFormLoader');
Method getCategoriesForSubmit
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function &getCategoriesForSubmit()
{
global $theresult;
$ret = [];
$criteria = new \CriteriaCompo();
Method getCategoriesForSearch
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getCategoriesForSearch()
{
global $theresult;
$ret = [];
Method cloneBlock
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function cloneBlock(int $bid): void
{
//require __DIR__ . '/admin_header.php';
// \xoops_cp_header();
Method createLogo
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function createLogo($dirname)
{
if (!\extension_loaded('gd')) {
return false;
}
Method publisher_items_columns_edit
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function publisher_items_columns_edit($options)
{
// require_once PUBLISHER_ROOT_PATH . '/class/blockform.php';
xoops_load('XoopsFormLoader');
Method serveCacheFile
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function serveCacheFile()
{
$this->debug(3, "Serving {$this->cachefile}");
if (!is_file($this->cachefile)) {
$this->error("serveCacheFile called in timthumb but we couldn't find the cached file.");
Method editBlock
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function editBlock(int $bid): void
{
// require_once \dirname(__DIR__,2) . '/admin/admin_header.php';
// \xoops_cp_header();
\xoops_loadLanguage('admin', 'system');