Showing 140 of 176 total issues
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 ) {
Function __construct
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($options = array())
{
if (isset($options['legend'])) {
$this->legend = $options['legend'];
}
- 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
Consider simplifying this complex logical expression. Open
if ( strstr( $pv_browser_string, 'os x' ) )
{
// if it doesn't have a version number, it is os x;
if ( strstr( $pv_browser_string, 'os x ' ) )
{
Function wavedPath
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function wavedPath(x,y,w,h,r){
Method _httpsrequest
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _httpsrequest($url,$URI,$http_method,$content_type="",$body="")
Function init
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function init($config)
{
$this->config = $config;
if (isset($config['siteName'])) {
- 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 addReflections
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function addReflections() {
var rimages = document.myGetElementsByClassName('reflect');
for (i=0;i<rimages.length;i++) {
var rheight = null;
var ropacity = 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
Function execute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function execute ()
{
$ch = curl_init();
$this->setAuth($ch);
- 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 containsFormElementType
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function containsFormElementType($type)
{
foreach ($this->formElements as $formElement) {
if (is_a($formElement, $type)) {
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 constructObject
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function constructObject() {
$this->loadMap();
if ($this->_map->has('constructor')) {
- 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 getValidations
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getValidations()
{
$validations = array();
foreach ($this->formElements as $formElement) {
- 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"