Showing 701 of 9,653 total issues
Function rotate
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function rotate($angle, $options = null)
{
if (!($angle == $this->_rotation_angle($angle))) {
// No rotation needed
return 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 PclTarHandlePathReduction
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function PclTarHandlePathReduction($p_dir)
{
TrFctStart(__FILE__, __LINE__, 'PclTarHandlePathReduction', "dir='$p_dir'");
$v_result = '';
- 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 _resize
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function _resize($new_x, $new_y, $options = null)
{
// there's no technical reason why resize can't be called multiple
// times...it's just silly to do so
$scaleMethod = $this->_getOption('scaleMethod', $options, 'smooth');
- 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 PclTarAddList
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function PclTarAddList($p_tarname, $p_filelist, $p_add_dir = '', $p_remove_dir = '', $p_mode = '')
{
TrFctStart(__FILE__, __LINE__, 'PclTarAddList', "tar=$p_tarname, file=$p_filelist, p_add_dir='$p_add_dir', p_remove_dir='$p_remove_dir', mode=$p_mode");
$v_result = 1;
$p_list_detail = [];
- 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 postPhotoTraitement
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function postPhotoTraitement($file, $checkMd5 = false)
{
// require_once XOOPS_ROOT_PATH.'/modules/extgallery/class/photoUploader.php';
$catHandler = Extgallery\Helper::getInstance()->getHandler('PublicCategory');
- 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 _largePhotoTreatment
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function _largePhotoTreatment($photoName)
{
/** @var Extgallery\Helper $helper */
$helper = Extgallery\Helper::getInstance();
- 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 bind
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind: function( elem, value ) {
// todo: revise if alternative tooltip is needed for mobile devices
if (Galleria.TOUCH) {
return;
Function bind
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind: function( elem, value ) {
// todo: revise if alternative tooltip is needed for mobile devices
if (Galleria.TOUCH) {
return;
Function raise
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Galleria.raise = function( msg, fatal ) {
var type = fatal ? 'Fatal error' : 'Error',
css = {
Function raise
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Galleria.raise = function( msg, fatal ) {
var type = fatal ? 'Fatal error' : 'Error',
css = {
Method _raiseError
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected static function _raiseError(
$object,
$message = null,
$code = null,
$mode = null,
Method createCat
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createCat($data)
{
/** @var Extgallery\PublicCategory $cat */
$cat = $this->create();
$cat->setVars($data);
Function _scaleImage
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
_scaleImage : function( image, options ) {
image = image || this._controls.getActive();
// janpub (JH) fix:
Function _scaleImage
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
_scaleImage : function( image, options ) {
image = image || this._controls.getActive();
// janpub (JH) fix:
Method cloneBlock
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function cloneBlock($bid)
{
xoops_cp_header();
$moduleDirName = \basename(\dirname(__DIR__));
$moduleDirNameUpper = \mb_strtoupper($moduleDirName);
Method getSearchedPhoto
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getSearchedPhoto($queryArray, $condition, $limit, $start, $userId)
{
$criteria = new CriteriaCompo();
if ($userId > 0) {
$criteria->add(new Criteria('uid', $userId));
Function _initResizeVideo
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _initResizeVideo( $slide, ratio, maxWidth, maxHeight )
{
var $video = $slide.children();
$slide
Method get_default_parameters
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function get_default_parameters()
{
$params = [
'type' => 'flex',
'random' => false,
Method editBlock
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function editBlock($bid)
{
//require __DIR__ . '/admin_header.php';
xoops_cp_header();
$moduleDirName = \basename(\dirname(__DIR__));
Method encode
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function encode($textarea_id)
{
\xoops_loadLanguage('extention', 'extgallery');
/* $code = "<img src='"