Showing 4,217 of 4,217 total issues
Method api_request
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function api_request($options = null)
{
if ( ! $this->ENABLE) {
return null;
}
Method google_maps
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function google_maps($name = '', $desc = '', $extra = [], $replace = [], $form)
{
if (is_array($desc)) {
$extra += $desc;
$desc = '';
Method send
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function send(array $params = [], &$error_message = '')
{
require_php_lib('sendgrid');
$error_message = null;
Method update
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function update(array $data, $params = [])
{
$table = $params['table'] ?: $this->get_table();
if ( ! $table) {
return false;
Method _sql_part_to_array
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _sql_part_to_array($part, $data = null, $config = null, $return_raw = false)
{
if ( ! $part) {
return false;
}
Method list_indexes
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function list_indexes($table, $extra = [], &$error = false)
{
if (is_array($table)) {
$extra = (array) $extra + $table;
$table = '';
Method footer_submit
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function footer_submit($name = '', $extra = [])
{
if (is_array($name)) {
$extra = $name;
$name = $extra['name'];
Method create
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function create($cloud_data = [], $params = [])
{
if (empty($cloud_data)) {
return '';
}
Method _create_cloud
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _create_cloud($cloud_data = [], $params = [])
{
if (empty($cloud_data)) {
return '';
}
Method feedback
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function feedback()
{
if (empty($_SESSION[$_GET['object'] . '__feedback'])) {
$_SESSION[$_GET['object'] . '__feedback'] = [
'order_by' => 'add_date',
Method checkout_images_revision
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function checkout_images_revision()
{
$_GET['id'] = (int) ($_GET['id']);
$revision_data = db()->get('SELECT * FROM ' . db('shop_product_images_revisions') . ' WHERE id=' . $_GET['id']);
if (empty($revision_data)) {
Method basket_main
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function basket_main()
{
$products_ids = [];
$basket_contents = module('shop')->_basket_api()->get_all();
foreach ((array) $basket_contents as $_item_id => $_info) {
Method _api_upload
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function _api_upload()
{
$file = $_FILES['file'];
if (empty($file) || $file['error'] != UPLOAD_ERR_OK) {
$this->_reject('PHP: Entity Too Large', '500 Internal Server Error', 500);
Method preview
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function preview($extra = [])
{
conf('ROBOTS_NO_INDEX', true);
no_graphics(true);
if (main()->USER_ID != 1) {
Method _track_error
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _track_error($error_message = '')
{
if (empty($error_message)) {
return false;
}
Method confirm
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function confirm()
{
// Send registration confirmation email
if ( ! $this->CONFIRM_REGISTER) {
return tpl()->parse('@object/confirm_messages', ['msg' => 'confirm_not_needed']);
Method _show_form
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _show_form()
{
// Already logged in users not needed to login again
if (main()->USER_ID) {
return js_redirect($this->DEF_REDIRECT_URL);
Method chart_flash
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function chart_flash($data, $params)
{
if (empty($data)) {
return;
}
Method check
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function check($field_in_form = 'image_numbers', $input = null)
{
if ( ! $this->ENABLED) {
return true;
}
Method create_models_alternate_methods
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function create_models_alternate_methods()
{
try {
// Method 2
$bear_cool1 = model('bear')->create([