Showing 3,246 of 4,217 total issues
Method li_tree
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function li_tree($data = [], $extra = [])
{
$extra['id'] = $extra['id'] ?: __FUNCTION__ . '_' . ++$this->_ids[__FUNCTION__];
if ($data) {
$data = $this->_parent->_recursive_sort_items($data);
Function payout
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
payout: function( options ) {
var $this = this;
$scope.block_wait = true;
$scope.is_submitted = true;
$scope.status = false;
Method _render
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function _render($result)
{
$asset_class = _class('assets');
$asset_class->clean_all();
$asset_class->ADD_IS_DIRECT_OUT = true;
Method submit
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function submit($name = '', $value = '', $extra = [], $replace = [])
{
if (is_array($name)) {
$extra = (array) $extra + $name;
$name = '';
Method active_box
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function active_box($name = '', $desc = '', $extra = [], $replace = [])
{
if (is_array($name)) {
$extra += $name;
$desc = '';
Method _compile_prepare_cond
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _compile_prepare_cond($cond = '', $for_right = false)
{
$cond = trim($cond);
$_array_magick = [
'_key' => '$_k',
Method process
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function process($options = null, $initialize = true, $error_messages = null)
{
$this->options = [
'upload_dir' => INCLUDE_PATH . 'uploads/' . $_GET['object'] . '/',
'upload_url' => WEB_PATH . 'uploads/' . $_GET['object'] . '/',
Method shell_exec
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function shell_exec($server_info = [], $cmd = '')
{
if ( ! $this->_INIT_OK || ! $cmd || ! $server_info) {
return false;
}
Method _order_step_start
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _order_step_start($FORCE_DISPLAY_FORM = false)
{
module('shop')->_basket_save();
$basket_contents = module('shop')->_basket_api()->get_all();
Method _attributes_save
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _attributes_save($object_id = 0)
{
if (empty($object_id)) {
return;
}
Method novaposhta_ua__import
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function novaposhta_ua__import()
{
// get data
// *** local
// $file = '/tmp/JsonWarehouseList.json';
Method xss_clean
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function xss_clean($str, $is_image = false)
{
// Is the string an array?
if (is_array($str)) {
while (list($key) = each($str)) {
Method _find_site
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _find_site($sites_dir = '')
{
$this->PROFILING && $this->_timing[] = [microtime(true), __CLASS__, __FUNCTION__, $this->trace_string(), func_get_args()];
if ( ! $sites_dir) {
$try_paths = [
Method _debug_stpls
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _debug_stpls(&$params = [])
{
if ( ! $this->SHOW_STPLS) {
return '';
}
Method call_class_method
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function call_class_method($class_name = '', $custom_path = '', $method_name = '', $method_params = '', $tpl_name = '', $silent = false, $use_cache = false, $cache_ttl = -1, $cache_key_override = '')
{
if ( ! strlen($class_name) || ! strlen($method_name)) {
return false;
}
Method edit
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function edit()
{
$id = (int) $_GET['id'];
if ($id) {
$a = from(self::table)->whereid($id)->get();
Method test_real_escape_string
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function test_real_escape_string()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}
Method import_base_db_structure
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function import_base_db_structure()
{
$import_tables = [
'dashboards',
'static_pages',
Function _url_control
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Open
public function _url_control()
{
if ( ! $this->ALLOW_URL_CONTROL) {
return false;
}
- Read upRead up
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 _user_message
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function _user_message($options = null)
{
$url = &$this->url;
// import operation
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
- Read upRead up
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"