Showing 3,246 of 4,217 total issues

Method _gen_dir_path has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function _gen_dir_path($id, $path = '', $make = false, $dir_mode = 0755, $create_index_htmls = 1)
Severity: Minor
Found in classes/yf_dir.class.php - About 35 mins to fix

    Method google_translate has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public function google_translate($text, $lang_from, $lang_to, $params = [], &$cache_used = false)
    Severity: Minor
    Found in classes/yf_services.class.php - About 35 mins to fix

      Method _decode_entities has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function _decode_entities($prefix, $codepoint, $original, &$table, &$exclude)
      Severity: Minor
      Found in classes/yf_utf8.class.php - About 35 mins to fix

        Method strip_tags_smart has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            /*string*/ $s,
            array $allowable_tags = null,
            /*boolean*/ $is_format_spaces = true,
            array $pair_tags = ['script', 'style', 'map', 'iframe', 'frameset', 'object', 'applet', 'comment', 'button'],
            array $para_tags = ['p', 'td', 'th', 'li', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'div', 'form', 'title', 'pre', 'textarea']
        Severity: Minor
        Found in functions/yf_strip_tags_smart.php - About 35 mins to fix

          Method _gen_dir_path has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              function _gen_dir_path($id, $path = '', $make = false, $dir_mode = 0755, $create_index_htmls = 1)
          Severity: Minor
          Found in functions/yf_common_funcs.php - About 35 mins to fix

            Function div_box has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                public function div_box($name, $values = [], $selected = '', $extra = [])
                {
                    if (is_array($name)) {
                        $extra = (array) $extra + $name;
                        $name = $extra['name'];
            Severity: Minor
            Found in plugins/html/classes/yf_html.class.php - About 35 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 gc has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                public function gc($life_time)
                {
                    $dh = opendir($start_dir);
                    while (false !== ($f = readdir($dh))) {
                        if ($f == '.' || $f == '..') {
            Severity: Minor
            Found in plugins/session/classes/session/yf_session_driver_files.class.php - About 35 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 view has a Cognitive Complexity of 7 (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_transfer.class.php - About 35 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_box has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                public function check_box($name = '', $value = '', $selected = '', $add_str = '', $extra = [])
                {
                    if (is_array($name)) {
                        $extra = (array) $extra + $name;
                        $name = $extra['name'];
            Severity: Minor
            Found in plugins/html/classes/yf_html.class.php - About 35 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 multi_del has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                public function multi_del(array $names)
                {
                    if ( ! $this->is_ready()) {
                        return null;
                    }
            Severity: Minor
            Found in plugins/memcached/classes/yf_wrapper_memcached.class.php - About 35 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 _load_lang has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                public function _load_lang($lang = '')
                {
                    if ( ! $this->TRANSLATE_ENABLED) {
                        return false;
                    }
            Severity: Minor
            Found in plugins/locale/classes/yf_i18n.class.php - About 35 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 _get_info has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                public function _get_info($id = null, $lang = null)
                {
                    $id = isset($id) ? $id : $_GET['id'];
                    $lang = isset($lang) ? $lang : $_GET['page'];
                    $a = db()->from(self::table)
            Severity: Minor
            Found in plugins/static_pages/admin_modules/yf_static_pages.class.php - About 35 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 accordion has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                public function accordion($data = [], $extra = [])
                {
                    $extra['id'] = $extra['id'] ?: __FUNCTION__ . '_' . ++$this->_ids[__FUNCTION__];
                    $items = [];
                    foreach ((array) $data as $k => $v) {
            Severity: Minor
            Found in plugins/html/classes/yf_html.class.php - About 35 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 _stpl_var_cleanup has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                public function _stpl_var_cleanup($in)
                {
                    $input = stripslashes(trim($in, '"\''));
                    $args = [];
                    // Complex case with substitutions

            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 carousel has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                public function carousel($data = [], $extra = [])
                {
                    $extra['id'] = $extra['id'] ?: __FUNCTION__ . '_' . ++$this->_ids[__FUNCTION__];
                    $items = [];
                    $headers = [];
            Severity: Minor
            Found in plugins/html/classes/yf_html.class.php - About 35 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 _get_absolute_path has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                public function _get_absolute_path($path)
                {
                    $parts = array_filter(explode(DIRECTORY_SEPARATOR, $path), 'strlen');
                    $absolutes = [];
                    foreach ($parts as $part) {
            Severity: Minor
            Found in plugins/assets/classes/yf_assets.class.php - About 35 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 account has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                public function account($options = null)
                {
                    // by account_id
                    $result = $this->get_account__by_id($options);
                    if ( ! empty($result)) {
            Severity: Minor
            Found in plugins/payment/classes/yf_payment_api.class.php - About 35 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 mail_copy has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                public function mail_copy($options = null)
                {
                    // import options
                    is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                    if (empty($_tpl) || empty($_data)) {
            Severity: Minor
            Found in plugins/payment/classes/yf_payment_api.class.php - About 35 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 load__p24_json has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                public function load__p24_json($options = null)
                {
                    // import options
                    is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                    // var
            Severity: Minor
            Found in plugins/payment/classes/yf_payment_api__currency.class.php - About 35 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 load__cashex_json has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                public function load__cashex_json($options = null)
                {
                    // import options
                    is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
                    // var
            Severity: Minor
            Found in plugins/payment/classes/yf_payment_api__currency.class.php - About 35 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

            Severity
            Category
            Status
            Source
            Language