Showing 3,246 of 4,217 total issues

Function yf_placeholder_img has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

function yf_placeholder_img($w = 100, $h = 100, $params = [])
{
    $w = abs((int) $w ?: 100);
    $h = abs((int) $h ?: 100);
    $text = $params['text'] ?: $w . ' x ' . $h;
Severity: Minor
Found in functions/yf_placeholder_img.php - About 1 hr 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

Method _show_filter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function _show_filter()
    {
        $object = &$this->object;
        $action = &$this->action;
        $filter_name = &$this->filter_name;
Severity: Minor
Found in plugins/payment/admin_modules/yf_manage_deposit.class.php - About 1 hr to fix

    Method _show_filter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function _show_filter()
        {
            $object = &$this->object;
            $action = &$this->action;
            $filter_name = &$this->filter_name;
    Severity: Minor
    Found in plugins/payment/admin_modules/yf_manage_transfer.class.php - About 1 hr to fix

      Function _timer has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  $this._timer = $timeout( function() {
                      var result = PaymentApi.operation( options );
                      result.$promise.then(
                          function( r ) {
                              $scope.block_wait   = false;
      Severity: Minor
      Found in plugins/content/templates/user/js/ng/payment/balance-recharge.js - About 1 hr to fix

        Method cache_fill has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function cache_fill()
            {
                $this->cache_purge();
                // TODO: use temp dir while caching
                // TODO: verify that all files are available
        Severity: Minor
        Found in plugins/assets/admin_modules/yf_manage_assets.class.php - About 1 hr to fix

          Method thumbnails has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function thumbnails($data = [], $extra = [])
              {
                  $items = [];
                  $columns = (int) $extra['columns'] ?: 3;
                  $row_class = 'span' . round(12 / $columns) . ' col-md-' . round(12 / $columns);
          Severity: Minor
          Found in plugins/html/classes/yf_html.class.php - About 1 hr to fix

            Method _show_filter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function _show_filter()
                {
                    $object = &$this->object;
                    $action = &$this->action;
                    $filter_name = &$this->filter_name;
            Severity: Minor
            Found in plugins/payment/admin_modules/yf_manage_payment_operation.class.php - About 1 hr to fix

              Method import has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function import()
                  {
                      $a['back_link'] = url('/@object/vars');
                      $a['redirect_link'] = $a['back_link'];
                      ! $a['lang'] && $a['lang'] = 'en';

                Method image_select_box has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function image_select_box($name, $values = [], $selected = '', $extra = [])
                    {
                        if (is_array($name)) {
                            $extra = (array) $extra + $name;
                        } else {
                Severity: Minor
                Found in plugins/html/classes/yf_html.class.php - About 1 hr to fix

                  Method set_content has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function set_content($asset_type, $md5, $content_type, $content, $params = [])
                      {
                          if (isset($this->content[$asset_type][$md5])) {
                              return $this->content[$asset_type][$md5];
                          }
                  Severity: Minor
                  Found in plugins/assets/classes/yf_assets.class.php - About 1 hr to fix

                    Method files has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function files()
                        {
                            $self_page_css = 'body.get-object-' . $_GET['object'];
                            css('
                                ' . $self_page_css . ' li.li-header { list-style: none; display:none; }
                    Severity: Minor
                    Found in plugins/locale/admin_modules/yf_locale_editor.class.php - About 1 hr to fix

                      Method user_var_edit has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function user_var_edit()
                          {
                              $_GET['id'] = (int) ($_GET['id']);
                              $A = db()->query_fetch('SELECT * FROM ' . db('locale_user_tr') . ' WHERE id=' . (int) ($_GET['id']));
                              if ( ! $A) {

                        Method _update has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function _update()
                            {
                                $currency__api = _class('payment_api__currency');
                                $result = true;
                                $total = 0;
                        Severity: Minor
                        Found in plugins/payment/admin_modules/yf_manage_currency.class.php - About 1 hr to fix

                          Method _check_all_interkassa has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function _check_all_interkassa()
                              {
                                  // var
                                  $html = _class('html');
                                  $payment_api = &$this->payment_api;
                          Severity: Minor
                          Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr to fix

                            Method type has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function type($options = null)
                                {
                                    // get type
                                    $type = $this->type;
                                    $type_index = $this->type_index;
                            Severity: Minor
                            Found in plugins/payment/classes/yf_payment_api.class.php - About 1 hr to fix

                              Method _show_filter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function _show_filter()
                                  {
                                      $object = &$this->object;
                                      $action = &$this->action;
                                      $filter_name = &$this->filter_name;
                              Severity: Minor
                              Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr to fix

                                Method get_account__by_id has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function get_account__by_id($options = null)
                                    {
                                        $account = &$this->account;
                                        $account_id = $this->account_id;
                                        // cache
                                Severity: Minor
                                Found in plugins/payment/classes/yf_payment_api.class.php - About 1 hr to fix

                                  Method _show_filter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function _show_filter()
                                      {
                                          $object = &$this->object;
                                          $action = &$this->action;
                                          $filter_name = &$this->filter_name;
                                  Severity: Minor
                                  Found in plugins/payment/admin_modules/yf_manage_currency.class.php - About 1 hr to fix

                                    Method _cancel has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function _cancel($options = null)
                                        {
                                            // import options
                                            is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                                            // var
                                    Severity: Minor
                                    Found in plugins/payment/classes/yf_payment_api.class.php - About 1 hr to fix

                                      Method fire has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function fire($event, $payload = [], $halt = false)
                                          {
                                              if (DEBUG_MODE) {
                                                  debug('events_' . __FUNCTION__ . '[]', [
                                                      'name' => $event,
                                      Severity: Minor
                                      Found in plugins/sys/classes/yf_core_events.class.php - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language