inc/triggers.inc.php
File triggers.inc.php
has 271 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
// File triggers.inc.php / FirebirdWebAdmin
// Purpose functions working with triggerss, included from accessories.php
// Author Lutz Brueckner <irie@gmx.de>
// Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005 by Lutz Brueckner,
Method get_trigger_definition
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function get_trigger_definition($title)
{
global $s_triggerdefs, $acc_strings, $s_cust;
$trigger_source = htmlspecialchars($s_triggerdefs['source']);
Method get_opened_trigger
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function get_opened_trigger($name, $trigger, $url)
{
global $dbhandle, $acc_strings, $ptitle_strings;
$type_str = implode('<br>', $trigger['type']);
Method get_triggers
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function get_triggers($oldtriggers)
{
global $dbhandle;
$lsql = 'SELECT RDB$TRIGGER_NAME AS NAME,'
Function get_triggertype_selectlist
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
function get_triggertype_selectlist($name, $sel = null, $empty = false)
{
$types = array('insert', 'update', 'delete');
$html = '';
if (SERVER_FAMILY == 'FB' && SERVER_VERSION >= 15) {
- 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"