Showing 3,246 of 4,217 total issues
Method js_cors
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function js_cors()
{
$api = _class('api');
echo <<<'EOS'
<!DOCTYPE html>
Method provider
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function provider($options = null)
{
// import options
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
// get providers
Method _pcntl_dispatch
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function _pcntl_dispatch($options = null)
{
$result = false;
// import options
is_array($options) && extract($options, EXTR_PREFIX_ALL | EXTR_REFS, '');
Method _recursive_get_menu_items
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _recursive_get_menu_items($menu_id = 0, $skip_item_id = 0)
{
if (empty($menu_id) || empty($this->_menu_items[$menu_id])) {
return false;
}
Method __api_response__result
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __api_response__result($operation_id, $response)
{
if ( ! $this->ENABLE) {
return null;
}
Method edit_stpl
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function edit_stpl()
{
$theme_name = $_GET['theme'];
$stpl_name = $_GET['name'];
if ( ! validate([$theme_name, $stpl_name], 'trim|required')) {
Method form_begin
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function form_begin($name = '', $method = '', $extra = [], $replace = [])
{
if (is_array($name)) {
$extra = (array) $extra + $name;
$name = '';
Method _validate_rules_process
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _validate_rules_process($validate_rules = [], &$data)
{
$validate_ok = true;
foreach ((array) $validate_rules as $name => $rules) {
$is_required = false;
Method postload
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function postload($params = [], $table)
{
$attr_postload_url = $params['attr_postload_url'] ?: 'postload-url';
$tr_id_key = $params['tr_id_key'] ?: 'name';
Method get_shard_table_name
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get_shard_table_name($table_name, $db)
{
$shard_table_name = '';
// Try sharding by year/month/day (example: db('currency_pairs_log_2013_07_01') from db('currency_pairs_log'))
if ( ! $shard_table_name && $this->SHARDING_BY_DAY) {
Method url_to_absolute
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function url_to_absolute($baseUrl, $relativeUrl)
{
// Remove several frag parts from URL
if (substr_count($baseUrl, '#') > 1) {
$baseUrl = substr($baseUrl, 0, strpos($baseUrl, '#', strpos($baseUrl, '#') + 1));
Method manufacturer_edit
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function manufacturer_edit()
{
$_GET['id'] = (int) ($_GET['id']);
if (empty($_GET['id'])) {
return _e('Empty ID!');
Method attribute_edit
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function attribute_edit()
{
if (empty($_GET['id'])) {
return _e('no id');
}
Method _get_git_details
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _get_git_details($FS_PATH, $as_submodule = false)
{
$git_base_path = $FS_PATH . '.git';
if ( ! file_exists($git_base_path)) {
return [];
Method _do_rewrite
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function _do_rewrite()
{
$this->PROFILING && $this->_timing[] = [microtime(true), __CLASS__, __FUNCTION__, $this->trace_string(), func_get_args()];
if ($this->is_console() || MAIN_TYPE_ADMIN || ! module_conf('tpl', 'REWRITE_MODE')) {
return false;
Method substr
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function substr($text, $start, $length = null)
{
if ($this->MULTIBYTE == $this->UNICODE_MULTIBYTE) {
return $length === null ? mb_substr($text, $start) : mb_substr($text, $start, $length);
}
Method test_complex
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function test_complex()
{
$per_page = 10;
conf('per_page', $per_page);
$this->assertEquals($per_page, conf('per_page'));
Method _do_compress_php_file
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _do_compress_php_file($file_to_open = '', $file_to_save = '')
{
$source = file_get_contents($file_to_open);
// Removes comments
foreach ((array) token_get_all($source) as $token) {
File articles_texts.data.php
has 258 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
return [
2 => [
'id' => '2',
yf_remote_files
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class yf_remote_files
{
/** @var string SMTP host to verify emails from. Be sure to set this correctly! */
public $SMTP_PROBE_HOST = 'mx.test.com';
/** @var string */