Showing 701 of 9,653 total issues
Function updateBlock
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function updateBlock($bid, $btitle, $bside, $bweight, $bvisible, $bcachetime, $bmodule, $options, $groups)
{
$myblock = new \XoopsBlock($bid);
$myblock->setVar('title', $btitle);
$myblock->setVar('weight', $bweight);
- 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 _dirToStruct
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
protected static function _dirToStruct($sPath, $maxinst, $aktinst = 0, $silent = false)
{
$struct = ['dirs' => [], 'files' => []];
if (false === ($dir = @opendir($sPath))) {
if (!$silent) {
- 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 extgalleryAjax
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function extgalleryAjax($options)
{
$photos = [];
/** @var Extgallery\PhotoHandler $photoHandler */
$photoHandler = Extgallery\Helper::getInstance()->getHandler('PublicPhoto');
- 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 getDescendants
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function getDescendants($id = 0, $includeSelf = false, $childrenOnly = false)
{
$idField = $this->fields['id'];
$node = $this->getNode($id);
- 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 getDescendants
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function getDescendants(
$id = 0,
$includeSelf = false,
$childrenOnly = false,
$withRestrict = true,
- 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 load
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Galleria.prototype.load = function() {
// pass if no data is provided or picasa option not found
if ( arguments.length || typeof this._options.picasa !== 'string' ) {
load.apply( this, Galleria.utils.array( arguments ) );
Function init
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function (options) {
Galleria.requires(1.33, 'This version of Classic theme requires Galleria 1.3.3 or later');
// add some elements
Function init
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function (options) {
Galleria.requires(1.33, 'This version of Classic theme requires Galleria 1.3.3 or later');
// add some elements
Function slideshow
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function slideshow() {
var
timeOut,
className = prefix + "Slideshow_",
click = "click." + prefix,
Method factory
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function &factory($driver = '')
{
if ('' == $driver) {
$extensions = [
'imagick' => 'Imagick3',
Function _exit
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
_exit: function( callback ) {
fullscreen.active = false;
var inBrowser = !self._options.trueFullscreen || !_nativeFullscreen.support,
Function _exit
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
_exit: function( callback ) {
fullscreen.active = false;
var inBrowser = !self._options.trueFullscreen || !_nativeFullscreen.support,
Function FlameViewportScale
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
function FlameViewportScale() {
this.delay = 600; // Delay after calling update to account for viewport bounce
this.orientation;
this.screenWidth; // Screen width corrected for orientation
this.timeout;
Method getAll
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function &getAll(CriteriaElement $criteria = null, $fields = null, $asObject = true, $id_as_key = true)
{
if ($fields && \is_array($fields)) {
if (!\in_array($this->handler->keyName, $fields)) {
$fields[] = $this->handler->keyName;
Function addTheme
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Galleria.addTheme = function( theme ) {
// make sure we have a name
if ( !theme.name ) {
Galleria.raise('No theme name specified');
Function addTheme
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Galleria.addTheme = function( theme ) {
// make sure we have a name
if ( !theme.name ) {
Galleria.raise('No theme name specified');
Method _parseLongOption
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected static function _parseLongOption($arg, $long_options, &$opts, &$argIdx, $args, $skip_unknown)
{
@list($opt, $opt_arg) = explode('=', $arg, 2);
$opt_len = strlen($opt);
Method render
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render()
{
// load all child ids for javascript codes
foreach (\array_keys($this->_itemTree) as $item_id) {
$this->_itemTree[$item_id]['allchild'] = [];
Function complete
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
complete: function( next ) {
// toggle low quality for IE
if ( 'image' in active ) {
Utils.toggleQuality( active.image, false );
Function complete
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
complete: function( next ) {
// toggle low quality for IE
if ( 'image' in active ) {
Utils.toggleQuality( active.image, false );