Showing 3,246 of 4,217 total issues
Method _payout_YandexMoney
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _payout_YandexMoney($title)
{
$payment_api = _class('payment_api');
$provider_class = $payment_api->provider_class([
'provider_name' => 'yandexmoney',
Method load
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function load($options = null)
{
// import options
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
// var
Method validate
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function validate($validate_rules = [], $post = [], $extra = [])
{
$this->_validate_prepare($validate_rules, $extra);
$func = function ($validate_rules, $post, $extra, $form) {
Method _check_ip
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _check_ip($ip, $ignore_ips = '', $check_type = 'force')
{
$masks = [
'0.0.0.0/8', // Current network (only valid as source address) RFC 1700
'10.0.0.0/8', // Private network RFC 1918
Method order_product_add_ajax
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function order_product_add_ajax()
{
if (empty($_POST['order_id']) || empty($_POST['product_id'])) {
return json_encode('ko');
}
Method show
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
// Check if user exists
if (empty($this->_user_info)) {
return _e('No such user!');
Method _save_log
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _save_log($params = [])
{
if ( ! $this->LOG_REDIRECTS) {
return false;
}
Method _loop_detected
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _loop_detected($cur_url)
{
if ( ! $this->LOOP_DEFENCE) {
return false;
}
Method deposition
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function deposition($options)
{
if ( ! $this->ENABLE) {
return null;
}
Method _payout_status_handler
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _payout_status_handler($options = null)
{
if ( ! $this->ENABLE) {
return null;
}
Method api_request
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function api_request($options = null)
{
if ( ! $this->ENABLE) {
return null;
}
Method show
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function show()
{
$quick_filter = $this->_show_quick_filter();
return
'<div class="col-md-12">' .
Method _init
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _init()
{
$i_default = redis();
$i_cache = strpos(strtolower(cache()->DRIVER), 'redis') !== false ? cache()->_driver->_connection : null;
if (ini_get('session.save_handler') == 'redis' && preg_match('~tcp://(?P<host>[a-z0-9_-]+):(?P<port>[0-9]+)~ims', ini_get('session.save_path'), $m)) {
Method test_10
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function test_10()
{
$this->assertEquals(
'<div class="bb_remote_image"><img src="http://www.google.com/intl/en_ALL/images/logo.gif"></div>',
self::_bbcode('[img]http://www.google.com/intl/en_ALL/images/logo.gif[/img]')
Function vars
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function vars()
{
$vars = $this->_get_all_vars_from_files();
$vars_db = $this->_get_all_vars_from_db();
foreach ((array) $vars_db as $source => $a) {
- 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 a
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function a()
{
$args = func_get_args();
$a = [];
// numerics params
- 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 _city_select
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function _city_select($params = [])
{
$STPL_NAME = 'register/city_select';
if ( ! empty($params['stpl_name'])) {
$STPL_NAME = $params['stpl_name'];
- 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 validate
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function validate($options)
{
// import options
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
// check payment method, type
- 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 prepare
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function prepare($options = null)
{
// import options
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
if (empty($_currency_rate)) {
- 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 _form_options
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function _form_options($options)
{
if ( ! $this->ENABLE) {
return null;
}
- 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"