Showing 482 of 487 total issues
Function helpBubbles
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
helpBubbles: function (trigger, bubbleContentSrc, bubbleColor) {
// declarations
var hintColorClass;
if (!bubbleContentSrc) {
Method auth_driver
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function auth_driver()
{
$auth_drivers = array(
'native' => $this->lang->line('installer_auth_driver_native')
);
Method display
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function display($view = false, $display_header = true, $display_footer = true, $return = false)
{
// Preventing from displaying the same page for several times
if ($this->already_displayed) {
return false;
Method render
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render()
{
$this->benchmark->mark('widget_'.$this->module_name.'_'.$this->module_name.'_render_start');
$controller_path = $this->modulepathresolver->getWidgetControllerPath($this->module_name);
Method generateFilePreview
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function generateFilePreview($field, $valueEscaped, $display_delete_file_link)
{
\CI_Controller::get_instance()->load->helper('number');
$output_element = '';
if ($valueEscaped) {
Function parsePolicy
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function parsePolicy($path)
{
if (!file_exists($path)) {
return false;
}
- 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 _fb_callback_make_filename_seo_friendly
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function _fb_callback_make_filename_seo_friendly(&$filename, $base_path, &$data, $current_image_field_name)
{
$data['name'] = 'customization';
// List of the fields to be used, if no value is present for a given key
- 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 generateForeignKeyFetchObjectValues
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function generateForeignKeyFetchObjectValues($field)
{
// Resolving FOREIGN_KEY_MANY_TO_MANY relationship for a valid definition
if ($field['foreign_key_relationship_type'] == FormBuilder::FOREIGN_KEY_MANY_TO_MANY
&& $field['foreign_key_junction_table']
- 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 deleteFileIfUserFlagSelected
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function deleteFileIfUserFlagSelected(&$save_array, $upload_field_name)
{
$wish_to_delete_file = $this->doesUserWishToDeleteFile($upload_field_name);
if ($wish_to_delete_file) {
$file_name_to_delete = $this->generateComputeFileField($upload_field_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 genericupload
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function genericupload($current_path = '', $file_field_name = 'file')
{
$make_filenames_nice = true;
$error = false;
- 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 getDashboardElements
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected function getDashboardElements()
{
$module_names = $this->modulerunner->getInstalledModulesNamesCached();
$dashboard_elements = array();
foreach ($module_names as $module_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 getDashboardElementsGrouped
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected function getDashboardElementsGrouped($dashboard_elements, $default_dashboard_element_group)
{
$dashboard_elements_grouped = array();
foreach ($dashboard_elements as $dashboard_element) {
if ($this->auth->isUserRoot() || !isset($dashboard_element['controller'])
- 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 ip_info
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function ip_info($ip)
{
if (!filter_var($ip, FILTER_VALIDATE_IP)) {
throw new InvalidArgumentException('IP is not valid');
}
- 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 generateCall
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function generateCall($value, $datagrid_constants, $formbuilder_constants, $tabs)
{
$definition_output = '';
foreach ($value as $v_key => $v_value) {
if ($v_key == 'filter_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 getTableLabelFieldName
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function getTableLabelFieldName($table, $exclude_field_names = array())
{
// Try from set of possible labels
$allowed_labels = array('name', 'label', 'username', 'login', 'fitst_name', 'last_name', 'code', 'id');
$fk_table_definition = $this->getDefinitionFromTable($table, false);
- 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 menurendor_render_submenu
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
function menurendor_render_submenu($menu_items, $level = 1)
{
$prefix = "\t";
for ($i = 0; $i < $level; $i++) {
$prefix .= "\t";
Method index
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function index()
{
$enable_frontend = $this->config->item('cms_enable_frontend');
$intranet = $this->config->item('cms_intranet');
Method display
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function display($view = false, $display_header = true, $display_footer = true, $return = false)
{
$this->benchmark->mark('display_start');
if ($this->already_displayed) {
Method logs
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function logs($collection, $resource_id = null, $title = false)
{
$where_conditions = array('collection' => $collection);
if ($resource_id) {
Method buildFileStructure
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function buildFileStructure($base_path)
{
$mainpage_module_path = $base_path . 'modules/mainpage/';
$files_template_path = realpath(dirname(realpath(__FILE__)) . '/../../resources/files_template/') . '/';