plugins/payment/admin_modules/yf_manage_payout.class.php

Summary

Maintainability
F
1 mo
Test Coverage

File yf_manage_payout.class.php has 2091 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

class yf_manage_payout
{
    public $IS_PAYOUT_INTERKASSA = null;
Severity: Major
Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 5 days to fix

    Method _operation has 204 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function _operation($options = null)
        {
            // var
            $is_valid = true;
            $is_options = true;
    Severity: Major
    Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 day to fix

      Method view has 173 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function view()
          {
              // check operation
              $operation = $this->_operation();
              // import options
      Severity: Major
      Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 6 hrs to fix

        Method show has 168 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function show()
            {
                $object = &$this->object;
                $action = &$this->action;
                $filter_name = &$this->filter_name;
        Severity: Major
        Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 6 hrs to fix

          yf_manage_payout has 43 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class yf_manage_payout
          {
              public $IS_PAYOUT_INTERKASSA = null;
          
              public $payment_api = null;
          Severity: Minor
          Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 5 hrs to fix

            Method _recreate has 111 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected function _recreate($options = null)
                {
                    // import operation
                    is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                    // var
            Severity: Major
            Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 4 hrs to fix

              Method _init has 110 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function _init()
                  {
                      // class
                      $this->payment_api = _class('payment_api');
                      $this->manage_payment_lib = module('manage_payment_lib');
              Severity: Major
              Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 4 hrs to fix

                Method csv_ecommpay has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function csv_ecommpay($options = null)
                    {
                        $operation_id = &$_POST['operation_id'];
                        if ( ! is_array($operation_id) || count($operation_id) < 1) {
                            common()->message_info('Отсутствуют данные');
                Severity: Major
                Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 4 hrs to fix

                  Function _operation has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function _operation($options = null)
                      {
                          // var
                          $is_valid = true;
                          $is_options = true;
                  Severity: Minor
                  Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 3 hrs 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 csv_ecommpay has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function csv_ecommpay($options = null)
                      {
                          $operation_id = &$_POST['operation_id'];
                          if ( ! is_array($operation_id) || count($operation_id) < 1) {
                              common()->message_info('Отсутствуют данные');
                  Severity: Minor
                  Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 3 hrs 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 view has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function view()
                      {
                          // check operation
                          $operation = $this->_operation();
                          // import options
                  Severity: Minor
                  Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 2 hrs 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 _filter_form_show has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function _filter_form_show($filter, $replace)
                      {
                          $order_fields = [
                              'o.operation_id' => 'номер операций',
                              'o.amount' => 'сумма',
                  Severity: Major
                  Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 2 hrs to fix

                    Method stats has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function stats()
                        {
                            $payment_api = &$this->payment_api;
                            // payment providers
                            $providers = $payment_api->provider();
                    Severity: Major
                    Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 2 hrs to fix

                      Method _user_message has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          protected function _user_message($options = null)
                          {
                              $url = &$this->url;
                              // import operation
                              is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                      Severity: Major
                      Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 2 hrs to fix

                        Method recreate has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function recreate()
                            {
                                // var
                                $payment_api = &$this->payment_api;
                                $url = &$this->url;
                        Severity: Major
                        Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 2 hrs to fix

                          Method _check_interkassa has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function _check_interkassa($options = null)
                              {
                                  // check operation
                                  $operation = $this->_operation($options);
                                  // import options
                          Severity: Major
                          Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 2 hrs to fix

                            Function _user_message has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                            Open

                                protected function _user_message($options = null)
                                {
                                    $url = &$this->url;
                                    // import operation
                                    is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                            Severity: Minor
                            Found in plugins/payment/admin_modules/yf_manage_payout.class.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 _status has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function _status($options = null)
                                {
                                    // check operation
                                    $operation = $this->_operation($options);
                                    // import options
                            Severity: Minor
                            Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr to fix

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

                                  public function interkassa_detect_card($options = null)
                                  {
                                      // import options
                                      is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                                      if (empty($_card)) {
                              Severity: Minor
                              Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr to fix

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

                                    public function request_interkassa()
                                    {
                                        // start
                                        db()->begin();
                                        // check operation
                                Severity: Minor
                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr to fix

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

                                      public function status_interkassa($options = null)
                                      {
                                          // import operation
                                          is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                                          // provider interkassa
                                  Severity: Minor
                                  Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr to fix

                                    Function _recreate has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        protected function _recreate($options = null)
                                        {
                                            // import operation
                                            is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                                            // var
                                    Severity: Minor
                                    Found in plugins/payment/admin_modules/yf_manage_payout.class.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 check_all_interkassa has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function check_all_interkassa($options = null)
                                        {
                                            // command line interface
                                            $is_cli = (php_sapi_name() == 'cli');
                                            $is_cli && $this->_check_all_interkassa_cli();
                                    Severity: Minor
                                    Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr to fix

                                      Function interkassa_detect_card has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          public function interkassa_detect_card($options = null)
                                          {
                                              // import options
                                              is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                                              if (empty($_card)) {
                                      Severity: Minor
                                      Found in plugins/payment/admin_modules/yf_manage_payout.class.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 csv has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function csv()
                                          {
                                              // class
                                              $payment_api = &$this->payment_api;
                                              $provider_class = $payment_api->provider_class([
                                      Severity: Minor
                                      Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr to fix

                                        Method mass_cancel has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function mass_cancel($options = null)
                                            {
                                                $operation_id = $this->_get_operation_id($options);
                                                is_numeric($operation_id) && $operation_id = [$operation_id => 1];
                                                if ( ! is_array($operation_id)) {
                                        Severity: Minor
                                        Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr to fix

                                          Method _confirmation_update_expired has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              public function _confirmation_update_expired()
                                              {
                                                  // var
                                                  $payment_api = _class('payment_api');
                                                  // update status only in_progress
                                          Severity: Minor
                                          Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr to fix

                                            Method mass_payout has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                            Open

                                                public function mass_payout($options = null)
                                                {
                                                    $operation_id = $this->_get_operation_id($options);
                                                    is_numeric($operation_id) && $operation_id = [$operation_id => 1];
                                                    if ( ! is_array($operation_id)) {
                                            Severity: Minor
                                            Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr to fix

                                              Function _get_daily_data has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                                  public function _get_daily_data($days = null)
                                                  {
                                                      $time = time();
                                                      $days = $days ?: 60;
                                                      $min_time = $time - $days * 86400;
                                              Severity: Minor
                                              Found in plugins/payment/admin_modules/yf_manage_payout.class.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 _save_csv has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                              Open

                                                  public function _save_csv($file_name, $data = null)
                                                  {
                                                      // setlocale( LC_ALL, 'ru_RU.utf8' )
                                                      // || setlocale( LC_ALL, 'ru_UA.utf8' )
                                                      // || setlocale( LC_ALL, 'en_US.utf8' );
                                              Severity: Minor
                                              Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr to fix

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

                                                    public function _get_daily_data($days = null)
                                                    {
                                                        $time = time();
                                                        $days = $days ?: 60;
                                                        $min_time = $time - $days * 86400;
                                                Severity: Minor
                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr to fix

                                                  Method _request has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                      public function _request($options = null)
                                                      {
                                                          // start
                                                          db()->begin();
                                                          // check operation
                                                  Severity: Minor
                                                  Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr to fix

                                                    Function _save_csv has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                                    Open

                                                        public function _save_csv($file_name, $data = null)
                                                        {
                                                            // setlocale( LC_ALL, 'ru_RU.utf8' )
                                                            // || setlocale( LC_ALL, 'ru_UA.utf8' )
                                                            // || setlocale( LC_ALL, 'en_US.utf8' );
                                                    Severity: Minor
                                                    Found in plugins/payment/admin_modules/yf_manage_payout.class.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 _http_csv has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                        public function _http_csv($options = null)
                                                        {
                                                            // import options
                                                            is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                                                            if ( ! is_array($_data) || empty($_file_name)) {
                                                    Severity: Minor
                                                    Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr to fix

                                                      Method recreate_items has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                          public function recreate_items()
                                                          {
                                                              // options
                                                              $operation_id = @$_GET['operation_id'];
                                                              $items = explode(',', @$_GET['items']);
                                                      Severity: Minor
                                                      Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 1 hr to fix

                                                        Method confirmation_update_expired has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                            public function confirmation_update_expired()
                                                            {
                                                                $url = &$this->url;
                                                                // command line interface
                                                                $is_cli = (php_sapi_name() == 'cli');
                                                        Severity: Minor
                                                        Found in plugins/payment/admin_modules/yf_manage_payout.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 _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

                                                              Function show has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                              Open

                                                                  public function show()
                                                                  {
                                                                      $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 45 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 _status has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                              Open

                                                                  public function _status($options = null)
                                                                  {
                                                                      // check operation
                                                                      $operation = $this->_operation($options);
                                                                      // import options
                                                              Severity: Minor
                                                              Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 45 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 _check_interkassa has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                              Open

                                                                  public function _check_interkassa($options = null)
                                                                  {
                                                                      // check operation
                                                                      $operation = $this->_operation($options);
                                                                      // import options
                                                              Severity: Minor
                                                              Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 45 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

                                                              Avoid too many return statements within this method.
                                                              Open

                                                                                          return 'o.operation_id = ' . (int) $v;
                                                              Severity: Major
                                                              Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                Avoid too many return statements within this method.
                                                                Open

                                                                                            return 'o.operation_id IN(' . _es($v) . ')';
                                                                Severity: Major
                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                  Avoid too many return statements within this method.
                                                                  Open

                                                                                      return  $result;
                                                                  Severity: Major
                                                                  Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                    Avoid too many return statements within this method.
                                                                    Open

                                                                            return  $result;
                                                                    Severity: Major
                                                                    Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                      Avoid too many return statements within this method.
                                                                      Open

                                                                                                  return 'u.id IN(' . _es($v) . ')';
                                                                      Severity: Major
                                                                      Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                        Avoid too many return statements within this method.
                                                                        Open

                                                                                        return  $r;
                                                                        Severity: Major
                                                                        Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                          Avoid too many return statements within this method.
                                                                          Open

                                                                                                  return '(u.name ' . $like . ' OR u.nick ' . $like . ' OR u.login ' . $like . ' OR u.email ' . $like . ')';
                                                                          Severity: Major
                                                                          Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                            Avoid too many return statements within this method.
                                                                            Open

                                                                                                return  null;
                                                                            Severity: Major
                                                                            Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                              Avoid too many return statements within this method.
                                                                              Open

                                                                                              return  $result;
                                                                              Severity: Major
                                                                              Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                Avoid too many return statements within this method.
                                                                                Open

                                                                                            return  $object;
                                                                                Severity: Major
                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                  Avoid too many return statements within this method.
                                                                                  Open

                                                                                          return
                                                                                              '<div class="col-md-12">' .
                                                                                                  ($data_chart ? '<div class="col-md-6" title="' . t('Транзакции по дням') . '">' . $data_chart . '</div>' : '') .
                                                                                                  ($quick_filter ? '<div class="col-md-6 pull-right" title="' . t('Быстрый фильтр') . '">' . $quick_filter . '</div>' : '') .
                                                                                              '</div>' .
                                                                                  Severity: Major
                                                                                  Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                    Avoid too many return statements within this method.
                                                                                    Open

                                                                                                return  $result;
                                                                                    Severity: Major
                                                                                    Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                      Avoid too many return statements within this method.
                                                                                      Open

                                                                                              return  $result;
                                                                                      Severity: Major
                                                                                      Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                        Avoid too many return statements within this method.
                                                                                        Open

                                                                                                    return  $result;
                                                                                        Severity: Major
                                                                                        Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                          Avoid too many return statements within this method.
                                                                                          Open

                                                                                                          return  $result;
                                                                                          Severity: Major
                                                                                          Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                            Avoid too many return statements within this method.
                                                                                            Open

                                                                                                            return  $result;
                                                                                            Severity: Major
                                                                                            Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                              Avoid too many return statements within this method.
                                                                                              Open

                                                                                                      return  $this->_user_message($result);
                                                                                              Severity: Major
                                                                                              Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                Avoid too many return statements within this method.
                                                                                                Open

                                                                                                        return  $result;
                                                                                                Severity: Major
                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                  Avoid too many return statements within this method.
                                                                                                  Open

                                                                                                              return  $result;
                                                                                                  Severity: Major
                                                                                                  Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                    Avoid too many return statements within this method.
                                                                                                    Open

                                                                                                                            return  $result;
                                                                                                    Severity: Major
                                                                                                    Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                      Avoid too many return statements within this method.
                                                                                                      Open

                                                                                                                          return  null;
                                                                                                      Severity: Major
                                                                                                      Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                        Avoid too many return statements within this method.
                                                                                                        Open

                                                                                                                        return  $result;
                                                                                                        Severity: Major
                                                                                                        Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                          Avoid too many return statements within this method.
                                                                                                          Open

                                                                                                                      return  $result;
                                                                                                          Severity: Major
                                                                                                          Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                            Avoid too many return statements within this method.
                                                                                                            Open

                                                                                                                    return  $result;
                                                                                                            Severity: Major
                                                                                                            Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                              Avoid too many return statements within this method.
                                                                                                              Open

                                                                                                                                  return  null;
                                                                                                              Severity: Major
                                                                                                              Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                                Avoid too many return statements within this method.
                                                                                                                Open

                                                                                                                        return  $result;
                                                                                                                Severity: Major
                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                                  Avoid too many return statements within this method.
                                                                                                                  Open

                                                                                                                              return  $this->_user_message($result);
                                                                                                                  Severity: Major
                                                                                                                  Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                                    Avoid too many return statements within this method.
                                                                                                                    Open

                                                                                                                                        return  null;
                                                                                                                    Severity: Major
                                                                                                                    Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                                      Avoid too many return statements within this method.
                                                                                                                      Open

                                                                                                                                  return  $this->_user_message($result);
                                                                                                                      Severity: Major
                                                                                                                      Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                                        Avoid too many return statements within this method.
                                                                                                                        Open

                                                                                                                                    return  $result;
                                                                                                                        Severity: Major
                                                                                                                        Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                                          Avoid too many return statements within this method.
                                                                                                                          Open

                                                                                                                                      return  $result;
                                                                                                                          Severity: Major
                                                                                                                          Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                                            Avoid too many return statements within this method.
                                                                                                                            Open

                                                                                                                                        return  $result;
                                                                                                                            Severity: Major
                                                                                                                            Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                                              Avoid too many return statements within this method.
                                                                                                                              Open

                                                                                                                                          return  $result;
                                                                                                                              Severity: Major
                                                                                                                              Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                Open

                                                                                                                                                            return 'u.id = ' . (int) $v;
                                                                                                                                Severity: Major
                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                  Open

                                                                                                                                                      return  null;
                                                                                                                                  Severity: Major
                                                                                                                                  Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                    Open

                                                                                                                                                return  $result;
                                                                                                                                    Severity: Major
                                                                                                                                    Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                      Open

                                                                                                                                                              return '(o.title ' . $like . ' OR o.options ' . $like . ')';
                                                                                                                                      Severity: Major
                                                                                                                                      Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                        Open

                                                                                                                                                            return  null;
                                                                                                                                        Severity: Major
                                                                                                                                        Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                          Open

                                                                                                                                                              return  null;
                                                                                                                                          Severity: Major
                                                                                                                                          Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                            Open

                                                                                                                                                    return  $result;
                                                                                                                                            Severity: Major
                                                                                                                                            Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                                                              Avoid too many return statements within this method.
                                                                                                                                              Open

                                                                                                                                                              return  $result;
                                                                                                                                              Severity: Major
                                                                                                                                              Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 30 mins to fix

                                                                                                                                                Function _confirmation_update_expired has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                Open

                                                                                                                                                    public function _confirmation_update_expired()
                                                                                                                                                    {
                                                                                                                                                        // var
                                                                                                                                                        $payment_api = _class('payment_api');
                                                                                                                                                        // update status only in_progress
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 25 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 _http_csv has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                Open

                                                                                                                                                    public function _http_csv($options = null)
                                                                                                                                                    {
                                                                                                                                                        // import options
                                                                                                                                                        is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                                                                                                                                                        if ( ! is_array($_data) || empty($_file_name)) {
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 25 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 request_interkassa has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                Open

                                                                                                                                                    public function request_interkassa()
                                                                                                                                                    {
                                                                                                                                                        // start
                                                                                                                                                        db()->begin();
                                                                                                                                                        // check operation
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 25 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 mass_payout has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                Open

                                                                                                                                                    public function mass_payout($options = null)
                                                                                                                                                    {
                                                                                                                                                        $operation_id = $this->_get_operation_id($options);
                                                                                                                                                        is_numeric($operation_id) && $operation_id = [$operation_id => 1];
                                                                                                                                                        if ( ! is_array($operation_id)) {
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 25 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 mass_cancel has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                                Open

                                                                                                                                                    public function mass_cancel($options = null)
                                                                                                                                                    {
                                                                                                                                                        $operation_id = $this->_get_operation_id($options);
                                                                                                                                                        is_numeric($operation_id) && $operation_id = [$operation_id => 1];
                                                                                                                                                        if ( ! is_array($operation_id)) {
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php - About 25 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

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

                                                                                                                                                        return form($replace, [
                                                                                                                                                                'filter' => true,
                                                                                                                                                                'selected' => $filter,
                                                                                                                                                            ])
                                                                                                                                                            ->daterange('datetime_start', [
                                                                                                                                                Severity: Major
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php and 1 other location - About 2 days to fix
                                                                                                                                                plugins/payment/admin_modules/yf_manage_deposit.class.php on lines 128..172

                                                                                                                                                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 471.

                                                                                                                                                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

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

                                                                                                                                                        $result = table($sql, [
                                                                                                                                                                'filter' => $filter,
                                                                                                                                                                'filter_params' => [
                                                                                                                                                                    'status_id' => function ($a) use ($payment_status_in_progress_id) {
                                                                                                                                                                        $result = null;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php and 1 other location - About 2 days to fix
                                                                                                                                                plugins/payment/admin_modules/yf_manage_deposit.class.php on lines 352..396

                                                                                                                                                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 449.

                                                                                                                                                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

                                                                                                                                                    public function _get_daily_data($days = null)
                                                                                                                                                    {
                                                                                                                                                        $time = time();
                                                                                                                                                        $days = $days ?: 60;
                                                                                                                                                        $min_time = $time - $days * 86400;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php and 1 other location - About 1 day to fix
                                                                                                                                                plugins/payment/admin_modules/yf_manage_deposit.class.php on lines 263..302

                                                                                                                                                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 317.

                                                                                                                                                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

                                                                                                                                                    public function confirmation_update_expired()
                                                                                                                                                    {
                                                                                                                                                        $url = &$this->url;
                                                                                                                                                        // command line interface
                                                                                                                                                        $is_cli = (php_sapi_name() == 'cli');
                                                                                                                                                Severity: Major
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php and 1 other location - About 1 day to fix
                                                                                                                                                plugins/payment/admin_modules/yf_manage_deposit.class.php on lines 771..805

                                                                                                                                                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 300.

                                                                                                                                                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

                                                                                                                                                            $content = table($response, ['no_total' => true])
                                                                                                                                                                ->text('datetime', 'дата')
                                                                                                                                                                ->func('data', function ($value, $extra, $row) use ($_provider_name, $_providers_user__by_name) {
                                                                                                                                                                    // message
                                                                                                                                                                    $message = @$row['status_message'] ?: @$row['data']['message'];
                                                                                                                                                Severity: Major
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php and 1 other location - About 1 day to fix
                                                                                                                                                plugins/payment/admin_modules/yf_manage_deposit.class.php on lines 628..645

                                                                                                                                                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 265.

                                                                                                                                                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

                                                                                                                                                    public function _show_quick_filter()
                                                                                                                                                    {
                                                                                                                                                        $a = [];
                                                                                                                                                        $status_names = from('payment_status')->get_2d('status_id, title');
                                                                                                                                                        $count_by_status = select(['status_id', 'COUNT(*) AS num'])->from('payment_operation')
                                                                                                                                                Severity: Major
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php and 1 other location - About 1 day to fix
                                                                                                                                                plugins/payment/admin_modules/yf_manage_deposit.class.php on lines 235..258

                                                                                                                                                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 249.

                                                                                                                                                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

                                                                                                                                                Identical blocks of code found in 5 locations. Consider refactoring.
                                                                                                                                                Open

                                                                                                                                                    public function _show_filter()
                                                                                                                                                    {
                                                                                                                                                        $object = &$this->object;
                                                                                                                                                        $action = &$this->action;
                                                                                                                                                        $filter_name = &$this->filter_name;
                                                                                                                                                Severity: Major
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php and 4 other locations - About 4 hrs to fix
                                                                                                                                                plugins/payment/admin_modules/yf_manage_currency.class.php on lines 96..126
                                                                                                                                                plugins/payment/admin_modules/yf_manage_deposit.class.php on lines 176..206
                                                                                                                                                plugins/payment/admin_modules/yf_manage_payment_operation.class.php on lines 142..172
                                                                                                                                                plugins/payment/admin_modules/yf_manage_transfer.class.php on lines 167..197

                                                                                                                                                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 181.

                                                                                                                                                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

                                                                                                                                                        foreach ($operation_id as $id => $selected) {
                                                                                                                                                            $id = (int) $id;
                                                                                                                                                            if ($id < 1) {
                                                                                                                                                                continue;
                                                                                                                                                            }
                                                                                                                                                Severity: Major
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php and 1 other location - About 3 hrs to fix
                                                                                                                                                plugins/payment/admin_modules/yf_manage_payout.class.php on lines 2082..2101

                                                                                                                                                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 154.

                                                                                                                                                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

                                                                                                                                                        foreach ($operation_id as $id => $selected) {
                                                                                                                                                            $id = (int) $id;
                                                                                                                                                            if ($id < 1) {
                                                                                                                                                                continue;
                                                                                                                                                            }
                                                                                                                                                Severity: Major
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php and 1 other location - About 3 hrs to fix
                                                                                                                                                plugins/payment/admin_modules/yf_manage_payout.class.php on lines 2128..2147

                                                                                                                                                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 154.

                                                                                                                                                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

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

                                                                                                                                                        if (is_array($o_options['processing'])) {
                                                                                                                                                            $processing_log = array_reverse($o_options['processing']);
                                                                                                                                                            $processing = reset($processing_log);
                                                                                                                                                            if (@$processing['provider_name'] && $processing['provider_name'] != $provider_name) {
                                                                                                                                                                @list($processing_provider_id, $processing_provider) = $payment_api->get_provider([
                                                                                                                                                Severity: Major
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php and 1 other location - About 3 hrs to fix
                                                                                                                                                plugins/payment/admin_modules/yf_manage_transfer.class.php on lines 521..534

                                                                                                                                                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 145.

                                                                                                                                                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

                                                                                                                                                    public function filter_save()
                                                                                                                                                    {
                                                                                                                                                        $object = &$this->object;
                                                                                                                                                        $id = &$this->id;
                                                                                                                                                        switch ($id) {
                                                                                                                                                Severity: Major
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php and 1 other location - About 2 hrs to fix
                                                                                                                                                plugins/payment/admin_modules/yf_manage_deposit.class.php on lines 209..232

                                                                                                                                                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 121.

                                                                                                                                                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

                                                                                                                                                Identical blocks of code found in 5 locations. Consider refactoring.
                                                                                                                                                Open

                                                                                                                                                    public function _url($name, $replace = null)
                                                                                                                                                    {
                                                                                                                                                        $url = &$this->url;
                                                                                                                                                        $result = null;
                                                                                                                                                        if (empty($url[$name])) {
                                                                                                                                                Severity: Major
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php and 4 other locations - About 1 hr to fix
                                                                                                                                                plugins/payment/admin_modules/yf_manage_deposit.class.php on lines 88..100
                                                                                                                                                plugins/payment/admin_modules/yf_manage_payment_operation.class.php on lines 64..76
                                                                                                                                                plugins/payment/admin_modules/yf_manage_payment_yandexmoney.class.php on lines 62..74
                                                                                                                                                plugins/payment/admin_modules/yf_manage_transfer.class.php on lines 110..122

                                                                                                                                                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 112.

                                                                                                                                                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 7 locations. Consider refactoring.
                                                                                                                                                Open

                                                                                                                                                            $content && $html_operations_by_method = table($content, ['no_total' => true])
                                                                                                                                                                ->text('operation_id', 'операция')
                                                                                                                                                                ->text('account_number', 'счет, номер карты, кошелек')
                                                                                                                                                                ->func('amount', function ($value, $extra, $row) use ($payment_api) {
                                                                                                                                                                    $result = $payment_api->money_html($value);
                                                                                                                                                Severity: Major
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php and 6 other locations - About 1 hr to fix
                                                                                                                                                plugins/payment/admin_modules/yf_manage_deposit.class.php on lines 352..413
                                                                                                                                                plugins/payment/admin_modules/yf_manage_payment.class.php on lines 332..373
                                                                                                                                                plugins/payment/admin_modules/yf_manage_payment_operation.class.php on lines 325..419
                                                                                                                                                plugins/payment/admin_modules/yf_manage_payout.class.php on lines 419..515
                                                                                                                                                plugins/payment/admin_modules/yf_manage_transfer.class.php on lines 281..355
                                                                                                                                                plugins/payment/admin_modules/yf_manage_transfer.class.php on lines 619..654

                                                                                                                                                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 110.

                                                                                                                                                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

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

                                                                                                                                                        $db = db()->select(
                                                                                                                                                            'o.operation_id',
                                                                                                                                                            'o.account_id',
                                                                                                                                                            'o.provider_id',
                                                                                                                                                            'o.options',
                                                                                                                                                Severity: Major
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php and 1 other location - About 1 hr to fix
                                                                                                                                                plugins/payment/admin_modules/yf_manage_deposit.class.php on lines 327..350

                                                                                                                                                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 108.

                                                                                                                                                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

                                                                                                                                                    public function expired($options = null)
                                                                                                                                                    {
                                                                                                                                                        $operation_id = (int) $this->_get_operation_id($options);
                                                                                                                                                        if ($operation_id < 1) {
                                                                                                                                                            $result = [
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php and 1 other location - About 45 mins to fix
                                                                                                                                                plugins/payment/admin_modules/yf_manage_payout.class.php on lines 2009..2024

                                                                                                                                                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 96.

                                                                                                                                                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

                                                                                                                                                    public function cancel($options = null)
                                                                                                                                                    {
                                                                                                                                                        $operation_id = (int) $this->_get_operation_id($options);
                                                                                                                                                        if ($operation_id < 1) {
                                                                                                                                                            $result = [
                                                                                                                                                Severity: Minor
                                                                                                                                                Found in plugins/payment/admin_modules/yf_manage_payout.class.php and 1 other location - About 45 mins to fix
                                                                                                                                                plugins/payment/admin_modules/yf_manage_payout.class.php on lines 2029..2044

                                                                                                                                                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 96.

                                                                                                                                                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

                                                                                                                                                There are no issues that match your filters.

                                                                                                                                                Category
                                                                                                                                                Status