Showing 3,246 of 4,217 total issues
Function _connect
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
public function _connect()
{
if (isset($this->sphinx_connection)) {
return $this->sphinx_connection;
}
- 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 _attrs_string2array
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
function _attrs_string2array($string = '', $strip_quotes = true)
{
$output_array = [];
if ( ! is_string($string)) {
return [];
- 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
Method _load_lang_get_vars_from_files
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _load_lang_get_vars_from_files($lang)
{
$files = [];
// Auto-find shared language vars. They will be connected in order of file system
// Names can be any, but better to include lang name into file name. Examples:
Method _filter_form_balance
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _filter_form_balance($filter, $replace)
{
$order_fields = [];
foreach (explode('|', 'operation_id|datetime_update|datetime_start|datetime_finish|title|amount|balance') as $f) {
$order_fields[$f] = $f;
Method csv
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function csv()
{
// class
$payment_api = &$this->payment_api;
$provider_class = $payment_api->provider_class([
Method currency_conversion_payout
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function currency_conversion_payout($options)
{
// import options
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
// var
Method _operation_form
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function _operation_form()
{
// import options
is_array($_GET) && extract($_GET, EXTR_PREFIX_ALL | EXTR_REFS, '');
is_array($_POST) && extract($_POST, EXTR_PREFIX_ALL | EXTR_REFS, '_');
Method _operation_balance_update
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _operation_balance_update($options = null)
{
// import options
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
// operation
Method edit
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function edit()
{
$_GET['id'] = (int) ($_GET['id']);
// Do save data
if ( ! empty($_POST)) {
Method table_info
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function table_info($table, $extra = [], &$error = false)
{
if (is_array($table)) {
$extra = (array) $extra + $table;
$table = '';
Method _get_admin_daily_info
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _get_admin_daily_info($sql, $days = 60, $admin_ids = [])
{
if ( ! $admin_ids) {
return false;
}
Method multi_del
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function multi_del($names = [])
{
$do_real_work = true;
if ( ! $this->_driver_ok) {
$do_real_work = false;
Method del_by_prefix
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function del_by_prefix($prefix = '')
{
$do_real_work = true;
if ( ! $this->_driver_ok) {
$do_real_work = false;
Method _render_table_td
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _render_table_td($info, $row, $params, $row_id)
{
$name = $info['name'];
if ( ! array_key_exists($name, $row)) {
return false;
Method view
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function view($params = [])
{
if ( ! is_array($params)) {
$params = [];
}
Method test_yf_db_installer_create_missing_table
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function test_yf_db_installer_create_missing_table()
{
$bak['ERROR_AUTO_REPAIR'] = self::db()->ERROR_AUTO_REPAIR;
self::db()->ERROR_AUTO_REPAIR = true;
Method execute
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output)
{
global $yf_paths;
require_once $yf_paths['db_setup_path'];
init_yf();
Method test_sakila_basic
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function test_sakila_basic()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}
Method test_order7
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function test_order7()
{
$jquery_url = _class('assets')->get_asset('jquery', 'js');
$url = $jquery_url;
$url1 = $url . '?v=1';
Method test_update_batch
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function test_update_batch()
{
if ($this->_need_skip_test(__FUNCTION__)) {
return;
}