MPOS/php-mpos

View on GitHub

Showing 1,089 of 1,089 total issues

Method encodeByteStream has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function encodeByteStream(Swift_OutputByteStream $os, Swift_InputByteStream $is, $firstLineOffset = 0, $maxLineLength = 0)
    {
        if ($maxLineLength > 76 || $maxLineLength <= 0) {
            $maxLineLength = 76;
        }

    Method filter has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function filter($buffer, $_minReplaces = -1)
        {
            if ($this->_treeMaxLen == 0) {
                return $buffer;
            }

      Method setHeaders has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function setHeaders(Swift_Mime_HeaderSet $headers)
          {
              $bodyLen = $this->_bodyLen;
              if (is_bool($bodyLen)) {
                  $bodyLen = - 1;
      Severity: Minor
      Found in include/lib/swiftmailer/classes/Swift/Signers/OpenDKIMSigner.php - About 1 hr to fix

        Function init has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                value: function init() {
                  var self = this;
                  $(this._element).find('li.' + this._config.activeClass).has('ul').children('ul').attr('aria-expanded', true).addClass(this._config.collapseClass + ' ' + this._config.collapseInClass);
        
                  $(this._element).find('li').not('.' + this._config.activeClass).has('ul').children('ul').attr('aria-expanded', false).addClass(this._config.collapseClass);

          Method mutingErrorHandler has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function mutingErrorHandler($errno, $errstr, $errfile, $errline, $errcontext)
              {
                  $_is_muted_directory = false;
          
                  // add the SMARTY_DIR to the list of muted directories
          Severity: Minor
          Found in include/smarty/libs/Smarty.class.php - About 1 hr to fix

            Method compile has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function compile($args, $compiler, $parameter)
                {
                    // check and get attributes
                    $_attr = $this->getAttributes($compiler, $args);
            
            
            Severity: Minor
            Found in include/smarty/libs/sysplugins/smarty_internal_compile_function.php - About 1 hr to fix

              Method yy_reduce has 34 lines of code (exceeds 25 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 1 hr to fix

                Method yy_reduce has 34 lines of code (exceeds 25 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 1 hr to fix

                  Method compile has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function compile($args, $compiler, $parameter, $tag, $method)
                      {
                          if (!isset($tag[5]) || substr($tag, -5) != 'close') {
                              // opening tag of block plugin
                              // check and get attributes

                    Method initResetPassword has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      public function initResetPassword($username) {
                        $this->debug->append("STA " . __METHOD__, 4);
                        // Fetch the users mail address
                        if (empty($username)) {
                          $this->setErrorMessage("Username must not be empty");
                    Severity: Minor
                    Found in include/classes/user.class.php - About 1 hr to fix

                      Method init has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function init()
                          {
                              if (count(self::$_map) > 0) {
                                  return;
                              }

                        Method __call has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          public function __call($method, $params) {
                            if (!is_scalar($method)) throw new Exception('Method name has no scalar value');
                        
                            if (is_array($params)) {
                              // no keys
                        Severity: Minor
                        Found in include/lib/jsonRPCClient.php - About 1 hr to fix

                          Method getNotificatorInstance has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  public function getNotificatorInstance($notificator, $data){
                                      $class = null;
                                      $file = null;
                                      
                                      if (is_array($notificator)){
                          Severity: Minor
                          Found in include/classes/pushnotification.class.php - About 1 hr to fix

                            Method doDefLists has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                protected function doDefLists($text) {
                                #
                                # Form HTML definition lists.
                                #
                                    $less_than_tab = $this->tab_width - 1;
                            Severity: Minor
                            Found in include/lib/Michelf/Markdown.php - About 1 hr to fix

                              Method encodeString has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0)
                                  {
                                      if ($maxLineLength > 76 || $maxLineLength <= 0) {
                                          $maxLineLength = 76;
                                      }
                              Severity: Minor
                              Found in include/lib/swiftmailer/classes/Swift/Encoder/QpEncoder.php - About 1 hr to fix

                                Method _appendFootnotes_callback has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    protected function _appendFootnotes_callback($matches) {
                                        $node_id = $this->fn_id_prefix . $matches[1];
                                        
                                        # Create footnote marker only if it has a corresponding footnote *and*
                                        # the footnote hasn't been used by another marker.
                                Severity: Minor
                                Found in include/lib/Michelf/Markdown.php - About 1 hr to fix

                                  Consider simplifying this complex logical expression.
                                  Open

                                                  if ((!isset($_compile_id) || (isset($_filepath[$_compile_id_part_length]) && !strncmp($_filepath, $_compile_id_part, $_compile_id_part_length)))
                                                      && (!isset($resource_name)
                                                          || (isset($_filepath[$_resource_part_1_length])
                                                              && substr_compare($_filepath, $_resource_part_1, -$_resource_part_1_length, $_resource_part_1_length) == 0)
                                                          || (isset($_filepath[$_resource_part_2_length])
                                  Severity: Critical
                                  Found in include/smarty/libs/sysplugins/smarty_internal_utility.php - About 1 hr to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                            if ($this->properties['version'] != Smarty::SMARTY_VERSION) {
                                                $is_valid = false;
                                            } elseif (((!$cache && $this->smarty->compile_check && empty($this->compiled->_properties) && !$this->compiled->isCompiled) || $cache && ($this->smarty->compile_check === true || $this->smarty->compile_check === Smarty::COMPILECHECK_ON)) && !empty($this->properties['file_dependency'])) {
                                                foreach ($this->properties['file_dependency'] as $_file_to_check) {
                                                    if ($_file_to_check[2] == 'file' || $_file_to_check[2] == 'php') {
                                    Severity: Critical
                                    Found in include/smarty/libs/sysplugins/smarty_internal_template.php - About 1 hr to fix

                                      Consider simplifying this complex logical expression.
                                      Open

                                      if ($config['twofactor']['enabled'] && $user->isAuthenticated()) {
                                        // set the token to be the old token, just in case an error occured
                                        $ea_token = (@$oldtoken_ea !== '') ? $oldtoken_ea : @$ea_token;
                                        $wf_token = (@$oldtoken_wf !== '') ? $oldtoken_wf : @$wf_token;
                                        $cp_token = (@$oldtoken_cp !== '') ? $oldtoken_cp : @$cp_token;
                                      Severity: Critical
                                      Found in include/pages/account/edit.inc.php - About 1 hr to fix

                                        Method getPluginFromDefaultHandler has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function getPluginFromDefaultHandler($tag, $plugin_type)
                                            {
                                                $callback = null;
                                                $script = null;
                                                $cacheable = true;
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language