File ezsqlModel.php
has 419 lines of code (exceeds 250 allowed). Consider refactoring. Wontfix
<?php
namespace ezsql;
use ezsql\ezQuery;
Function debug
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function debug($print_to_screen = true)
{
// Start output buffering
\ob_start();
- 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
ezsqlModel
has 32 functions (exceeds 20 allowed). Consider refactoring. Wontfix
class ezsqlModel extends ezQuery implements ezsqlModelInterface
{
protected $isSecure = false;
protected $secureOptions = null;
protected $sslKey = null;
Method debug
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Wontfix
public function debug($print_to_screen = true)
{
// Start output buffering
\ob_start();
Function get_results
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function get_results(string $query = null, $output = \OBJECT, bool $use_prepare = false)
{
// Log how the function was called
$this->log_query("\$db->get_results(\"$query\", $output, $use_prepare)");
- 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 store_cache
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function store_cache(string $query, bool $is_insert = false)
{
// The would be cache file for this query
$cache_file = $this->cacheDir . \_DS . \md5($query);
- 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 varDump
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Wontfix
public function varDump($mixed = null)
{
// Start output buffering
\ob_start();
Function varDump
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function varDump($mixed = null)
{
// Start output buffering
\ob_start();
- 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 get_cache
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function get_cache(string $query)
{
// The would be cache file for this query
$cache_file = $this->cacheDir . \_DS . \md5($query);
- 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 get_col_info
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function get_col_info(string $info_type = "name", int $col_offset = -1)
{
if ($this->colInfo) {
$new_array = [];
if ($col_offset == -1) {
- 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 __call
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function __call($function, $args)
{
$prefix = \substr($function, 0, 3);
$property = \lcfirst(\substr($function, 3, \strlen($function)));
// Todo: make properties PSR-1, add following for backward compatibility
- 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"