File Aware.php
has 253 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Polyfony\Entity;
use Polyfony\Exception as Exception;
use Polyfony\Query\Convert as Convert;
- Create a ticketCreate a ticket
Method save
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function save() :bool {
// if nothing has changed on this object
if(!count($this->_['altered'])) {
// we consider the object saved without touching the database
- Create a ticketCreate a ticket
Method set
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function set(
$column_or_array,
$value = null
) {
// if we want to set a batch of values
- Create a ticketCreate a ticket
Method autoPopulate
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function autoPopulate(
string $when
) :void {
// for each column to autopopulate
- Create a ticketCreate a ticket
Function autoPopulate
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private function autoPopulate(
string $when
) :void {
// for each column to autopopulate
- Read upRead up
- Create a ticketCreate a ticket
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 set
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function set(
$column_or_array,
$value = null
) {
// if we want to set a batch of values
- Read upRead up
- Create a ticketCreate a ticket
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 save
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function save() :bool {
// if nothing has changed on this object
if(!count($this->_['altered'])) {
// we consider the object saved without touching the database
- Read upRead up
- Create a ticketCreate a ticket
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"