Showing 1,049 of 26,336 total issues
Function mouseClickHandler
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
mouseClickHandler: function (e) {
if (!e) e = window.event;
if (e.button > 1) return true;
if (!e.target) e.target = e.srcElement;
Function changeSize
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
changeSize: function (up, to, dur) {
// transition
var trans = this.transitions,
other = up ? (this.last ? this.last.a : null) : hs.upcoming,
t = (trans[1] && other
Method render
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render()
{
global $xoopsGTicket;
// load all child ids for javascript codes
Method ImageBorder
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ImageBorder(&$gdimg, $border_width, $radius_x, $radius_y, $hexcolor_border)
{
$border_width = ($border_width ?: 1);
$radius_x = ($radius_x ?: 0);
$radius_y = ($radius_y ?: 0);
Consider simplifying this complex logical expression. Open
if (!@$_GET['w'] && !@$_GET['wp'] && !@$_GET['wl'] && !@$_GET['ws'] && !@$_GET['h'] && !@$_GET['hp']
&& !@$_GET['hl']
&& !@$_GET['hs']
) {
// no resizing needed
Function init
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function () {
if (!hs.container) {
hs.ieLt7 = hs.ie && hs.uaVersion < 7;
hs.ieLt9 = hs.ie && hs.uaVersion < 9;
Method gd_info
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
function gd_info()
{
static $gd_info = array();
if (empty($gd_info)) {
// based on code by johnschaefer at gmx dot de
Function mouseClickHandler
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
mouseClickHandler: function (e) {
if (!e) e = window.event;
if (e.button > 1) return true;
if (!e.target) e.target = e.srcElement;
Method __construct
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($target_date = '', $language = 'japanese', $reload = false)
{
// ���դΥ��å�
if ($target_date) {
$this->set_date($target_date);
Method ImprovedImageRotate
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function ImprovedImageRotate(
&$gdimg_source,
$rotate_angle = 0,
$config_background_hexcolor = 'FFFFFF',
$bg = null,
Function get_coming_time_description
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function get_coming_time_description($start, $now, $admission = true)
{
// ��ǧ��Í̵�ˤ�äƥɥå�GIF���ؤ���
if ($admission) {
$dot = '';
- 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 savepictures
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function savepictures($event_id)
{
xoops_load('xoopsmediauploader');
$uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH . '/apcal', array(
'image/gif',
- 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 ResolveSource
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function ResolveSource()
{
if (is_resource($this->gdimg_source)) {
$this->DebugMessage('ResolveSource() exiting because is_resource($this->gdimg_source)', __FILE__, __LINE__);
- 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 CalculateThumbnailDimensions
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function CalculateThumbnailDimensions()
{
$this->DebugMessage('CalculateThumbnailDimensions() starting with [W,H,sx,sy,sw,sh] initially set to ['
. $this->source_width
. ','
- 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 resolvePath
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function resolvePath($path, $allowed_dirs)
{
$this->DebugMessage('resolvePath: ' . $path . ' (allowed_dirs: ' . print_r($allowed_dirs, true) . ')', __FILE__, __LINE__);
// add base path to the top of the list
- 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 OffsiteDomainIsAllowed
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function OffsiteDomainIsAllowed($hostname, $allowed_domains)
{
static $domain_is_allowed = array();
$hostname = strtolower($hostname);
if (!isset($domain_is_allowed[$hostname])) {
- 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 Colorize
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function Colorize(&$gdimg, $amount, $targetColor)
{
$amount = (is_numeric($amount) ? $amount : 25);
$amountPct = $amount / 100;
$targetColor = (phpthumb_functions::IsHexColor($targetColor) ? $targetColor : 'gray');
- 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 ImageBorder
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function ImageBorder(&$gdimg, $border_width, $radius_x, $radius_y, $hexcolor_border)
{
$border_width = ($border_width ?: 1);
$radius_x = ($radius_x ?: 0);
$radius_y = ($radius_y ?: 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 positionOverlay
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
positionOverlay: function (overlay) {
var p = overlay.position || 'middle center',
offX = overlay.offsetX,
offY = overlay.offsetY;
if (overlay.parentNode != this.overlayBox) this.overlayBox.appendChild(overlay);
Method check
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function check($post = true, $area = '')
{
global $xoopsModule;
$this->_errors = array();