arastta/arastta

View on GitHub

Showing 7,509 of 7,509 total issues

Function print_graph has a Cognitive Complexity of 689 (exceeds 5 allowed). Consider refactoring.
Open

function print_graph($g,$pgwidth) {
    $splines = false;
    $bandw = false;
    $percent = false;
    $show_percent = false;
Severity: Minor
Found in system/mpdf/graph.php - About 2 wks to fix

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

File summernote.js has 4412 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Super simple wysiwyg editor on Bootstrap v0.6.16
 * http://summernote.org/
 *
 * summernote.js
Severity: Major
Found in admin/view/javascript/summernote/summernote.js - About 1 wk to fix

    Similar blocks of code found in 12 locations. Consider refactoring.
    Open

    <?php
    
    $rtlSUB = array (
     "00622" => array ( 1 => "0FE82",),
     "00623" => array ( 1 => "0FE84",),
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.URD .php on lines 1..130

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 2098.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 12 locations. Consider refactoring.
    Open

    <?php
    
    $rtlSUB = array (
     "00622" => array ( 1 => "0FE82",),
     "00623" => array ( 1 => "0FE84",),
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.URD .php on lines 1..130

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 2098.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 12 locations. Consider refactoring.
    Open

    <?php
    
    $rtlSUB = array (
     "00622" => array ( 1 => "0FE82",),
     "00623" => array ( 1 => "0FE84",),
    Severity: Major
    Found in system/mpdf/ttfontdata/dejavusans.GSUB.arab.SND .php and 11 other locations - About 1 wk to fix
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.URD .php on lines 1..130

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 2098.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 12 locations. Consider refactoring.
    Open

    <?php
    
    $rtlSUB = array (
     "00622" => array ( 1 => "0FE82",),
     "00623" => array ( 1 => "0FE84",),
    Severity: Major
    Found in system/mpdf/ttfontdata/dejavusans.GSUB.arab.KUR .php and 11 other locations - About 1 wk to fix
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.URD .php on lines 1..130

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 2098.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 12 locations. Consider refactoring.
    Open

    <?php
    
    $rtlSUB = array (
     "00622" => array ( 1 => "0FE82",),
     "00623" => array ( 1 => "0FE84",),
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.URD .php on lines 1..130

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 2098.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 12 locations. Consider refactoring.
    Open

    <?php
    
    $rtlSUB = array (
     "00622" => array ( 1 => "0FE82",),
     "00623" => array ( 1 => "0FE84",),
    Severity: Major
    Found in system/mpdf/ttfontdata/dejavusans.GSUB.arab.DFLT.php and 11 other locations - About 1 wk to fix
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.URD .php on lines 1..130

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 2098.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 12 locations. Consider refactoring.
    Open

    <?php
    
    $rtlSUB = array (
     "00622" => array ( 1 => "0FE82",),
     "00623" => array ( 1 => "0FE84",),
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.URD .php on lines 1..130

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 2098.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 12 locations. Consider refactoring.
    Open

    <?php
    
    $rtlSUB = array (
     "00622" => array ( 1 => "0FE82",),
     "00623" => array ( 1 => "0FE84",),
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.SND .php on lines 1..130

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 2098.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 12 locations. Consider refactoring.
    Open

    <?php
    
    $rtlSUB = array (
     "00622" => array ( 1 => "0FE82",),
     "00623" => array ( 1 => "0FE84",),
    Severity: Major
    Found in system/mpdf/ttfontdata/dejavusans.GSUB.arab.URD .php and 11 other locations - About 1 wk to fix
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.URD .php on lines 1..130

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 2098.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 12 locations. Consider refactoring.
    Open

    <?php
    
    $rtlSUB = array (
     "00622" => array ( 1 => "0FE82",),
     "00623" => array ( 1 => "0FE84",),
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.URD .php on lines 1..130

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 2098.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 12 locations. Consider refactoring.
    Open

    <?php
    
    $rtlSUB = array (
     "00622" => array ( 1 => "0FE82",),
     "00623" => array ( 1 => "0FE84",),
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.URD .php on lines 1..130

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 2098.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 12 locations. Consider refactoring.
    Open

    <?php
    
    $rtlSUB = array (
     "00622" => array ( 1 => "0FE82",),
     "00623" => array ( 1 => "0FE84",),
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusans.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.KUR .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensed.GSUB.arab.URD .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.DFLT.php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.SND .php on lines 1..130
    system/mpdf/ttfontdata/dejavusanscondensedB.GSUB.arab.URD .php on lines 1..130

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 2098.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function Gradient has a Cognitive Complexity of 576 (exceeds 5 allowed). Consider refactoring.
    Open

    function Gradient($x, $y, $w, $h, $type, $stops=array(), $colorspace='RGB', $coords='', $extend='', $return=false, $is_mask=false) {
        if (strtoupper(substr($type,0,1)) == 'L') { $type = 2; }    // linear
        else if (strtoupper(substr($type,0,1)) == 'R') { $type = 3; }    // radial
        if ($colorspace != 'CMYK' && $colorspace != 'Gray') {
            $colorspace = 'RGB';
    Severity: Minor
    Found in system/mpdf/classes/grad.php - About 1 wk to fix

    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

    File Excel5.php has 3979 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * PHPExcel
     *
     * Copyright (c) 2006 - 2014 PHPExcel
    Severity: Major
    Found in system/PHPExcel/Classes/PHPExcel/Reader/Excel5.php - About 1 wk to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      +function ($) {
        'use strict';
      
        // COLLAPSE PUBLIC CLASS DEFINITION
        // ================================
      Severity: Major
      Found in catalog/view/javascript/bootstrap/js/bootstrap.js and 1 other location - About 1 wk to fix
      admin/view/javascript/bootstrap/js/bootstrap.js on lines 540..741

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 1846.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      +function ($) {
        'use strict';
      
        // COLLAPSE PUBLIC CLASS DEFINITION
        // ================================
      Severity: Major
      Found in admin/view/javascript/bootstrap/js/bootstrap.js and 1 other location - About 1 wk to fix
      catalog/view/javascript/bootstrap/js/bootstrap.js on lines 538..739

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 1846.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object') {
          elFinder.prototype.i18.cs = {
              translator : 'Jay Gridley &lt;gridley.jay@hotmail.com&gt;',
              language   : 'čeština',
              direction  : 'ltr',
      Severity: Major
      Found in admin/view/javascript/elfinder/i18n/elfinder.cs.js and 1 other location - About 1 wk to fix
      admin/view/javascript/elfinder/i18n/elfinder.it.js on lines 6..366

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 1804.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18) == 'object') {
          elFinder.prototype.i18.it = {
              translator : 'Alberto Tocci (alberto.tocci@gmail.com)',
              language   : 'Italiano',
              direction  : 'ltr',
      Severity: Major
      Found in admin/view/javascript/elfinder/i18n/elfinder.it.js and 1 other location - About 1 wk to fix
      admin/view/javascript/elfinder/i18n/elfinder.cs.js on lines 6..366

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 1804.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Severity
      Category
      Status
      Source
      Language