MPOS/php-mpos

View on GitHub

Showing 889 of 1,089 total issues

Method smarty_modifier_relative_date has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function smarty_modifier_relative_date($timestamp, $days = false, $format = "M j, Y") {
  
  if (!is_numeric($timestamp)) {
    // It's not a time stamp, so try to convert it...
    $timestamp = strtotime($timestamp);
Severity: Minor
Found in include/smarty/libs/plugins/modifier.relative_date.php - About 1 hr to fix

    Method smarty_function_html_radios_output has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function smarty_function_html_radios_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids, $escape)
    {
        $_output = '';
    
        if (is_object($value)) {
    Severity: Minor
    Found in include/smarty/libs/plugins/function.html_radios.php - About 1 hr to fix

      Method smarty_function_cycle has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function smarty_function_cycle($params, $template)
      {
          static $cycle_vars;
      
          $name = (empty($params['name'])) ? 'default' : $params['name'];
      Severity: Minor
      Found in include/smarty/libs/plugins/function.cycle.php - About 1 hr to fix

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

            public function compile($args, $compiler, $parameter)
            {
                // the following must be assigned at runtime because it will be overwritten in Smarty_Internal_Compile_Append
                $this->required_attributes = array('var', 'value');
                $this->shorttag_order = array('var', 'value');
        Severity: Minor
        Found in include/smarty/libs/sysplugins/smarty_internal_compile_assign.php - About 1 hr to fix

          Method yylex4 has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function yylex4()
              {
                  $tokenMap = array (
                        1 => 0,
                        2 => 0,
          Severity: Minor
          Found in include/smarty/libs/sysplugins/smarty_internal_configfilelexer.php - About 1 hr to fix

            Method _canonicalizeBody has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected function _canonicalizeBody($string)
                {
                    $len = strlen($string);
                    $canon = '';
                    $method = ($this->_bodyCanon == "relaxed");
            Severity: Minor
            Found in include/lib/swiftmailer/classes/Swift/Signers/DKIMSigner.php - About 1 hr to fix

              Method compileAllTemplates has 46 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static function compileAllTemplates($extension, $force_compile, $time_limit, $max_errors, Smarty $smarty)
                  {
                      // switch off time limit
                      if (function_exists('set_time_limit')) {
                          @set_time_limit($time_limit);
              Severity: Minor
              Found in include/smarty/libs/sysplugins/smarty_internal_utility.php - About 1 hr to fix

                Method createTemplate has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null, $do_clone = true)
                    {
                        if (!empty($cache_id) && (is_object($cache_id) || is_array($cache_id))) {
                            $parent = $cache_id;
                            $cache_id = null;
                Severity: Minor
                Found in include/smarty/libs/Smarty.class.php - About 1 hr to fix

                  Method append has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function append($tpl_var, $value = null, $merge = false, $nocache = false)
                      {
                          if (is_array($tpl_var)) {
                              // $tpl_var is an array, ignore $value
                              foreach ($tpl_var as $_key => $_val) {
                  Severity: Minor
                  Found in include/smarty/libs/sysplugins/smarty_internal_data.php - About 1 hr to fix

                    Method yylex6 has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function yylex6()
                        {
                            $tokenMap = array (
                                  1 => 0,
                                  2 => 0,
                    Severity: Minor
                    Found in include/smarty/libs/sysplugins/smarty_internal_configfilelexer.php - About 1 hr to fix

                      Method getTransactionTypebyTime has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        public function getTransactionTypebyTime($account_id=NULL) {
                          $this->debug->append("STA " . __METHOD__, 4);
                          if ($data = $this->memcache->get(__FUNCTION__)) return $data;
                          $stmt = $this->mysqli->prepare("
                            SELECT
                      Severity: Minor
                      Found in include/classes/transaction.class.php - About 1 hr to fix

                        Method yylex5 has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function yylex5()
                            {
                                $tokenMap = array (
                                      1 => 0,
                                      2 => 0,
                        Severity: Minor
                        Found in include/smarty/libs/sysplugins/smarty_internal_configfilelexer.php - About 1 hr to fix

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

                              public function compile($args, $compiler)
                              {
                                  if (!($compiler->smarty instanceof SmartyBC)) {
                                      throw new SmartyException("{include_php} is deprecated, use SmartyBC class to enable");
                                  }

                            Method setChildren has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function setChildren(array $children, $compoundLevel = null)
                                {
                                    // TODO: Try to refactor this logic
                            
                                    $compoundLevel = isset($compoundLevel)
                            Severity: Minor
                            Found in include/lib/swiftmailer/classes/Swift/Mime/SimpleMimeEntity.php - About 1 hr to fix

                              Method parseSpan has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  protected function parseSpan($str) {
                                  #
                                  # Take the string $str and parse it into tokens, hashing embeded HTML,
                                  # escaped characters and handling code spans.
                                  #
                              Severity: Minor
                              Found in include/lib/Michelf/Markdown.php - About 1 hr to fix

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

                                    public function __call($name, $args)
                                    {
                                        static $_prefixes = array('set' => true, 'get' => true);
                                        static $_resolved_property_name = array();
                                        static $_resolved_property_source = array();
                                Severity: Minor
                                Found in include/smarty/libs/sysplugins/smarty_internal_templatebase.php - About 1 hr to fix

                                  Method yylex3 has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function yylex3()
                                      {
                                          $tokenMap = array (
                                                1 => 0,
                                              );
                                  Severity: Minor
                                  Found in include/smarty/libs/sysplugins/smarty_internal_configfilelexer.php - About 1 hr to fix

                                    Method smarty_outputfilter_trimwhitespace has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function smarty_outputfilter_trimwhitespace($source, Smarty_Internal_Template $smarty)
                                    {
                                        $store = array();
                                        $_store = 0;
                                        $_offset = 0;
                                    Severity: Minor
                                    Found in include/smarty/libs/plugins/outputfilter.trimwhitespace.php - About 1 hr to fix

                                      Method to_smarty_php has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function to_smarty_php()
                                          {
                                              $code = '';
                                              for ($key = 0, $cnt = count($this->subtrees); $key < $cnt; $key++) {
                                                  if ($key + 2 < $cnt) {
                                      Severity: Minor
                                      Found in include/smarty/libs/sysplugins/smarty_internal_parsetree.php - About 1 hr to fix

                                        Method sendMail has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          public function sendMail($template, $aData, $throttle=false) {
                                            // Prepare SMTP transport and mailer
                                            $transport_type = $this->config['swiftmailer']['type'];
                                            if ($transport_type == 'sendmail') {
                                              $transport = Swift_SendmailTransport::newInstance($this->config['swiftmailer'][$transport_type]['path'] . ' ' . $this->config['swiftmailer'][$transport_type]['options']);
                                        Severity: Minor
                                        Found in include/classes/mail.class.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language