Showing 176 of 176 total issues
Function wavedRect
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function wavedRect(ctx,x,y,w,h,r,n){
Function roundedRect
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function roundedRect(ctx,x,y,width,height,radius,nopath){
Avoid deeply nested control flow statements. Open
if(!window.opera) addLining(context,border,border,canvas.width-(border*2),canvas.height-(border*4),opacity,inset,true);
Function resolvePartsFromRestfulUri
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function resolvePartsFromRestfulUri()
{
if ($this->uriParts[1] === 'index.php') {
array_shift($this->uriParts);
}
- 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 _httprequest
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function _httprequest($url,$fp,$URI,$http_method,$content_type="",$body="")
Function addLinearStyle
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function addLinearStyle(ctx,x,y,w,h,opacity) {
Avoid deeply nested control flow statements. Open
if ( !$moz_rv )
{
// you can use this if you are running php >= 4.2
if ( function_exists( 'floatval' ) )
{
Avoid deeply nested control flow statements. Open
if ( $moz_type == 'rv' )
{
$moz_type = 'mozilla';
}
Avoid deeply nested control flow statements. Open
if ( strstr( $browser_number, '7.' ) && strstr( $browser_user_agent, 'trident/5' ) )
{
// note that 7.0 becomes 9 when adding 1, but if it's 7.1 it will be 9.1
$true_ie_number = $browser_number + 2;
}
Function qC
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function qC(cX,cY,CPx,CPy,aX,aY) {var z=new Array(6); z[0]=cX+2.0/3.0*(CPx-cX); z[1]=cY+2.0/3.0*(CPy-cY); z[2]=z[0]+(aX-cX)/3.0; z[3]=z[1]+(aY-cY)/3.0; z[4]=aX; z[5]=aY; return z;}
Avoid deeply nested control flow statements. Open
if ( ( $moz_release_date < 20020400 ) || ( $moz_rv < 1 ) )
{
$b_safe_browser = false;
}
Avoid deeply nested control flow statements. Open
if ( $browser_number < 5 )// opera 4 wasn't very useable.
{
$b_safe_browser = false;
}
Avoid deeply nested control flow statements. Open
for ( $j = 0; $j < $j_count; $j++ )
{
if ( strstr( $browser_user_agent, $a_moz_types[$j] ) )
{
$moz_type = $a_moz_types[$j];
Function addDependenciesToListForComponent
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function addDependenciesToListForComponent(
$dependencySourceList,
&$component,
$key,
$requirement = null
- 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
Avoid deeply nested control flow statements. Open
if ( strstr( $browser_number, '9.' ) && strstr( $browser_user_agent, 'version/' ) )
{
get_set_count( 'set', 0 );
$browser_number = get_item_version( $browser_user_agent, 'version/' );
}
Avoid deeply nested control flow statements. Open
for ( $j = 0; $j < $j_count; $j++ )
{
if ( strstr( $browser_user_agent, $a_webkit_types[$j] ) )
{
$webkit_type = $a_webkit_types[$j];
Avoid deeply nested control flow statements. Open
if(noshading==0) addShading(context,border,border,canvas.width-(border*2),canvas.height-(border*4),opacity);
Function resolveComponentDependencies
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function resolveComponentDependencies($component)
{
if (is_object($component) && is_a($component, 'travi\\framework\\DependantObject')) {
$this->addDependencies($component->getDependencies(), $component);
} else if (is_array($component)) { //TODO: need to make this DRY
- 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 addShading
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function addShading(ctx,x,y,width,height,opacity) {
Function Set_Cookie
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function Set_Cookie( name, value, expires, path, domain, secure ) {