Showing 162 of 204 total issues
File data.php
has 267 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// Purpose working with data (import/export, type in, ...)
// Author Lutz Brueckner <irie@gmx.de>
// Copyright (c) 2000-2006 by Lutz Brueckner,
// published under the terms of the GNU General Public Licence v.2,
Method get_opened_table
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_opened_table($name, $title, $url, $curl = '', $cdiv = '')
{
global $s_fields, $tb_strings, $ptitle_strings;
$html = <<<EOT
Method get_systable
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_systable($s_systable)
{
global $dbhandle;
// get the field names and types
Function print_value
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function print_value($wt, $val, $type, $colname = null, $obj = null)
{
if ($val === null) {
$data = '<i>NULL</i>';
$align = 'center';
- 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 index_definition
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
function index_definition($indexname, $title)
{
global $indices, $acc_strings;
if ($indexname != null && !isset($_POST['acc_modind_doit'])) {
Method get_preset_charsets
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_preset_charsets($server_family = null, $server_version = null)
{
$charsets = array('ASCII',
'BIG_5',
'CYRL',
Method get_domain_definitions
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_domain_definitions($olddomains)
{
global $dbhandle, $s_charsets;
$sql = 'SELECT F.RDB$FIELD_NAME AS DNAME,'
Method get_opened_view
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_opened_view($name, $title, $url)
{
global $dbhandle, $s_fields, $tb_strings, $acc_strings, $ptitle_strings;
$source = get_view_source($name);
Method get_systable_html
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_systable_html($table, $s_systable)
{
$html = "<table id=\"systable\" class=\"table table-bordered table-hover tsep\" cellpadding=\"2\">\n<thead><tr>\n";
foreach (array_keys($table) as $colname) {
if ($s_systable['order'] == $colname) {
Method modify_index
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
function modify_index($iname)
{
global $dbhandle, $indices, $fb_error, $lsql;
// alter the active/inactive status if the change was selected
Method _renderField
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _renderField($field, $idx, $value)
{
global $sql_strings, $dt_strings;
if (is_string($value)) {
Method systable_textblobs
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function systable_textblobs()
{
return
array('RDB$CHARACTER_SETS' => array('columns' => array('RDB$DESCRIPTON'),
'indices' => array('RDB$RDB$CHARACTER_SET_NAME'),
Method get_coldef_definition
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_coldef_definition($idx, $title, $rowspan, $collate = false)
{
global $s_coldefs, $tb_strings, $s_domains;
$coldefs = isset($s_coldefs[$idx]) ? $s_coldefs[$idx] : array();
Method export_data
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function export_data($export)
{
global $s_fields, $warning;
ini_set('ibase.dateformat', $export['general']['date']);
Function get_domain_definitions
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function get_domain_definitions($olddomains)
{
global $dbhandle, $s_charsets;
$sql = 'SELECT F.RDB$FIELD_NAME AS DNAME,'
- 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 _renderField
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected function _renderField($field, $idx, $value)
{
global $sql_strings, $dt_strings;
if (is_string($value)) {
- 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 build_coldef
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function build_coldef($idx, $mode = 'create')
{
global $s_coldefs;
if (!isset($s_coldefs[$idx]['name']))
Method get_reserved_words
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_reserved_words($server_family, $server_version)
{
$reserved_words =
array('ACTION', 'ACTIVE', 'ADD', 'ADMIN', 'AFTER', 'ALL', 'ALTER', 'AND', 'ANY',
'AS', 'ASC', 'ASCENDING', 'AT', 'AUTO', 'AUTODLL', 'AVG', 'BASED', 'BASENAME',
Method print_value
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function print_value($wt, $val, $type, $colname = null, $obj = null)
{
if ($val === null) {
$data = '<i>NULL</i>';
$align = 'center';
Function build_datatype
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function build_datatype($defs, $type = 'column', $mode = 'create')
{
$datatype = $defs['type'];
$sql = '';
- 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"