Showing 3,246 of 4,217 total issues
Method _api_balance
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _api_balance($request, $options)
{
// security
$_request = [];
foreach (['operation_id', 'amount', 'currency_id', 'provider_id', 'page', 'method_id', 'account', 'name'] as $key) {
Method show
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function show()
{
$func = function ($row) {
return ! ($row['name'] == 'center_area' && $row['type'] == 'admin');
};
Method api_request_send
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function api_request_send($options = null)
{
if ( ! $this->ENABLE) {
return null;
}
Method new_query
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function new_query($params = [])
{
if ($params['where'] === null) {
unset($params['where']);
}
Method _compile
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _compile($name, $replace = [], $string = '')
{
$_time_start = microtime(true);
// For later check for templates changes
Method textarea
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function textarea($name, $desc = '', $extra = [], $replace = [])
{
if (is_array($desc)) {
$extra = (array) $extra + $desc;
$desc = '';
Method stars
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function stars($name = '', $desc = '', $extra = [], $replace = [], $form)
{
if (is_array($desc)) {
$extra += $desc;
$desc = '';
Method _input_assign_params_from_validate
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _input_assign_params_from_validate($extra = [], $form)
{
$name = $extra['name'];
$is_html_array = (false !== strpos($name, '['));
if ($is_html_array) {
Method view_unread
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function view_unread()
{
if (empty(main()->USER_ID)) {
return;
}
Method dequeue
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function dequeue($extra = [])
{
queue()->listen($this->QUEUE_NAME, function ($data) use ($extra) {
$data = json_decode($data, true);
if ($data) {
Method authorize
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function authorize()
{
$request_token_info = $this->_storage_get('request_token');
if ($request_token_info && $_GET['denied'] != $request_token_info['oauth_token']) {
return $request_token_info;
Method get_user_info
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get_user_info()
{
$access_token = $this->_storage_get('access_token');
if ( ! $access_token) {
$access_token = $this->get_access_token();
Method is_search_engine_url
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function is_search_engine_url($url = '')
{
$url = trim($url);
if ( ! strlen($url)) {
return false;
Method unit_add
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function unit_add()
{
if (main()->is_post()) {
if ( ! $_POST['title']) {
_re('Unit title must be filled');
Method user_edit
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function user_edit()
{
if ($_GET['id']) {
$A = db()->query_fetch('SELECT * FROM ' . db('user') . ' WHERE id=' . (int) ($_GET['id']));
if (empty($A)) {
Method products
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function products()
{
$sql = $this->_sql();
return table($sql, [
Method _add_receiver_user
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _add_receiver_user($name, $user_id, $text = '', $url = '')
{
$notification_id = db()->get_one('SELECT `id` FROM `' . db('notifications') . "` WHERE `id`='" . _es($name) . "'
OR (`is_common_template`=1 AND `template_alias` = '" . _es($name) . "')");
if ((int) $notification_id == 0) {
Method checkout_group_revision
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function checkout_group_revision()
{
$_GET['id'] = (int) ($_GET['id']);
$db = db('shop_product_revisions');
$ids = db()->get_one('SELECT data FROM ' . $db . ' WHERE item_id=' . $_GET['id'] . ' AND data IS NOT NULL ORDER BY id DESC');
Method _order_step_delivery
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _order_step_delivery($FORCE_DISPLAY_FORM = false)
{
// Validate previous form
if (main()->is_post() && ! $FORCE_DISPLAY_FORM) {
module('shop')->_order_validate_delivery();
Method _get_group_prices
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _get_group_prices($product_ids = [])
{
if (is_numeric($product_ids)) {
$return_single = $product_ids;
$product_ids = [$product_ids];