Method updateSchema
has 384 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateSchema()
{
// Drop any older (not used anymore) FTS indexes on the spots full table
$this->dropIndex('idx_spotsfull_fts_1', 'spotsfull');
$this->dropIndex('idx_spotsfull_fts_2', 'spotsfull');
File SpotStruct_abs.php
has 540 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
abstract class SpotStruct_abs
{
protected $_dbcon;
Function updateSchema
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
public function updateSchema()
{
// Drop any older (not used anymore) FTS indexes on the spots full table
$this->dropIndex('idx_spotsfull_fts_1', 'spotsfull');
$this->dropIndex('idx_spotsfull_fts_2', 'spotsfull');
- 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
SpotStruct_abs
has 35 functions (exceeds 20 allowed). Consider refactoring. Open
abstract class SpotStruct_abs
{
protected $_dbcon;
public function __construct(dbeng_abs $dbEng)
Function compareIndex
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function compareIndex($idxname, $type, $tablename, $colList)
{
// Retrieve index information
$q = $this->getIndexInfo($idxname, $tablename);
- 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 modifyColumn
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
abstract public function modifyColumn($colName, $tablename, $colType, $colDefault, $notNull, $collation, $what);
Function compareColumn
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function compareColumn($colName, $tablename, $colType, $colDefault, $notNull, $collation)
{
// Retrieve the column information
$q = $this->getColumnInfo($tablename, $colName);
- 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 compareColumn
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function compareColumn($colName, $tablename, $colType, $colDefault, $notNull, $collation)
Method addColumn
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
abstract public function addColumn($colName, $tablename, $colType, $colDefault, $notNull, $collation);
Method validateColumn
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function validateColumn($colName, $tablename, $colType, $colDefault, $notNull, $collation)
Method dropForeignKey
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
abstract public function dropForeignKey($tablename, $colname, $reftable, $refcolumn, $action);
Method addForeignKey
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
abstract public function addForeignKey($tablename, $colname, $reftable, $refcolumn, $action);
Avoid too many return
statements within this method. Open
return 'charset';
Avoid too many return
statements within this method. Open
return true;