File export.inc.php
has 512 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// Purpose functions for the data export panel
// 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 sql_format_options_table
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
function sql_format_options_table($export)
{
global $dt_strings;
return '
Method csv_format_options_table
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
function csv_format_options_table($export)
{
global $dt_strings;
return '
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 export_data
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function export_data($export)
{
global $s_fields, $warning;
ini_set('ibase.dateformat', $export['general']['date']);
- 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 get_export_form_data
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_export_form_data($old)
{
$export = array('format' => get_request_data('dt_export_format'),
'source' => array('option' => get_request_data('dt_export_source'),
Method get_export_defaults
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_export_defaults()
{
$date_default = ini_get('ibase.dateformat');
$time_default = ini_get('ibase.timeformat');
Method export_sql_data
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function export_sql_data($export, $table)
{
global $fb_error, $warning, $dbhandle;
$line_ending = replace_escape_sequences($export['sql']['lineend']);
Function export_sql_data
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function export_sql_data($export, $table)
{
global $fb_error, $warning, $dbhandle;
$line_ending = replace_escape_sequences($export['sql']['lineend']);
- 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 csv_value
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function csv_value($value, $num_field, $enclose_type, $fields_enclosed, $escape_character, $replace_null, $fields_terminator)
Function export_table_query
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function export_table_query($table, $export)
{
global $warning;
$columns = array();
- 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 export_csv_data
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function export_csv_data($export)
{
global $fb_error, $warning, $dbhandle;
$fields_terminator = replace_escape_sequences($export['csv']['fterm']);
- 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"