MPOS/php-mpos

View on GitHub

Showing 889 of 1,089 total issues

Function yy_reduce has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public function yy_reduce($yyruleno)
    {
        $yymsp = $this->yystack[$this->yyidx];
        if ($this->yyTraceFILE && $yyruleno >= 0
              && $yyruleno < count(self::$yyRuleName)) {
Severity: Minor
Found in include/smarty/libs/sysplugins/smarty_internal_templateparser.php - About 55 mins 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

Function yy_reduce has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public function yy_reduce($yyruleno)
    {
        $yymsp = $this->yystack[$this->yyidx];
        if ($this->yyTraceFILE && $yyruleno >= 0
              && $yyruleno < count(self::$yyRuleName)) {
Severity: Minor
Found in include/smarty/libs/sysplugins/smarty_internal_configfileparser.php - About 55 mins 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

Function yy_shift has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public function yy_shift($yyNewState, $yyMajor, $yypMinor)
    {
        $this->yyidx++;
        if ($this->yyidx >= self::YYSTACKDEPTH) {
            $this->yyidx--;
Severity: Minor
Found in include/smarty/libs/sysplugins/smarty_internal_configfileparser.php - About 55 mins 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

Function trigger_config_file_error has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public function trigger_config_file_error($args = null)
    {
        $this->lex = Smarty_Internal_Configfilelexer::instance();
        $this->parser = Smarty_Internal_Configfileparser::instance();
        // get template source line which has error
Severity: Minor
Found in include/smarty/libs/sysplugins/smarty_internal_config_file_compiler.php - About 55 mins 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

Function bind_param has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  public function bind_param($paramTypes) {
    if (!is_string($paramTypes)) {
      return false;
    } else {
      $args = func_get_args();
Severity: Minor
Found in include/classes/strict.class.php - About 55 mins 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

Function getAllUserShares has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  public function getAllUserShares() {
    $this->debug->append("STA " . __METHOD__, 4);
    if (! $data = $this->memcache->get(STATISTICS_ALL_USER_SHARES)) {
      $data['share_id'] = 0;
      $data['data'] = array();
Severity: Minor
Found in include/classes/statistics.class.php - About 55 mins 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

Function getUserEstimates has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  public function getUserEstimates($value1, $value2, $dDonate, $bNoFees, $ppsvalue=0) {
    $this->debug->append("STA " . __METHOD__, 4);
    if ($this->config['payout_system'] != 'pps') {
      if (@$value1['valid'] > 0  && @$value2['valid'] > 0) {
        $this->config['reward_type'] == 'fixed' ? $reward = $this->config['reward'] : $reward = $this->block->getAverageAmount();
Severity: Minor
Found in include/classes/statistics.class.php - About 55 mins 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

Function update has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  public function update($userID, $address, $ap_threshold, $currency=NULL) {
    if ($currency === NULL) $currency = $this->config['currency'];
    if ($address != $this->getCoinAddress($userID) && $this->existsCoinAddress($address)) {
      $this->setErrorMessage('Unable to update coin address, address already exists');
      return false;
Severity: Minor
Found in include/classes/coin_address.class.php - About 55 mins 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

Function version has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public function version($propertyName, $type = self::VERSION_TYPE_STRING)
    {
        if (empty($propertyName)) {
            return false;
        }
Severity: Minor
Found in include/lib/Mobile_Detect.php - About 55 mins 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

Function _doHeloCommand has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    protected function _doHeloCommand()
    {
        try {
            $response = $this->executeCommand(
                sprintf("EHLO %s\r\n", $this->_domain), array(250)
Severity: Minor
Found in include/lib/swiftmailer/classes/Swift/Transport/EsmtpTransport.php - About 55 mins 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

Function md5_hh has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    function md5_hh(a, b, c, d, x, s, t) {
Severity: Major
Found in public/site_assets/bootstrap/js/jquery.md5.js - About 50 mins to fix

    Function md5_ii has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        function md5_ii(a, b, c, d, x, s, t) {
    Severity: Major
    Found in public/site_assets/bootstrap/js/jquery.md5.js - About 50 mins to fix

      Function md5_ff has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          function md5_ff(a, b, c, d, x, s, t) {
      Severity: Major
      Found in public/site_assets/bootstrap/js/jquery.md5.js - About 50 mins to fix

        Function md5_gg has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            function md5_gg(a, b, c, d, x, s, t) {
        Severity: Major
        Found in public/site_assets/bootstrap/js/jquery.md5.js - About 50 mins to fix

          Method fetch has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null, $display = false, $merge_tpl_vars = true, $no_output_filter = false)
          Severity: Major
          Found in include/smarty/libs/sysplugins/smarty_internal_templatebase.php - About 50 mins to fix

            Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public function __construct($template_resource, $smarty, $_parent = null, $_cache_id = null, $_compile_id = null, $_caching = null, $_cache_lifetime = null)
            Severity: Major
            Found in include/smarty/libs/sysplugins/smarty_internal_template.php - About 50 mins to fix

              Method getSubTemplate has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public function getSubTemplate($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope)
              Severity: Major
              Found in include/smarty/libs/sysplugins/smarty_internal_template.php - About 50 mins to fix

                Method fetch has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    protected function fetch($cid, $resource_name = null, $cache_id = null, $compile_id = null, &$content = null, &$timestamp = null, $resource_uid = null)
                Severity: Major
                Found in include/smarty/libs/sysplugins/smarty_cacheresource_keyvaluestore.php - About 50 mins to fix

                  Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    public function __construct($type, $username, $password, $host, $debug_level, $debug_object, $memcache) {
                  Severity: Major
                  Found in include/classes/bitcoinwrapper.class.php - About 50 mins to fix

                    Method sendMessage3 has 7 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        protected function sendMessage3($response, $username, $password, $timestamp, $client, Swift_Transport_SmtpAgent $agent, $v2 = true)
                      Severity
                      Category
                      Status
                      Source
                      Language