Showing 203 of 203 total issues
Method makeAnchor
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function makeAnchor(State $commandState)
{
$commandClass = $commandState->commandClass;
$commandClasses = array();
if ($commandClass !== $this->definition->commandClass) {
Function processColumns
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
protected function processColumns()
{
$this->alterLines->disable();
$intersect = 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 get
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function get($key = null, Closure $addOnMiss = null)
{
if (null === $addOnMiss && $this->mode === self::MODE_CAPTURE) {
throw new Mock\Exception('Reading disabled in capture mode', Mock\Exception::PLAY_REQUIRED);
}
- 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 findLines
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
private function findLines()
{
foreach ($this->rows as $rowIndex => $row) {
foreach ($row as $key => $value) {
if (!$value instanceof Content\Text) {
- 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 getUsage
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function getUsage() {
$usage = '';
if (!$this->isUnnamed) {
if ($this->shortName) {
$usage = Runner::OPTION_SHORT . $this->shortName;
- 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 rusDayMonthToDate
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function rusDayMonthToDate($string)
{
if (null === $this->year || null === $this->month || null === $this->day) {
list($this->year, $this->month, $this->day) = explode('/', $this->date('Y/m/d'));
}
- 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 addContent
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function addContent($message)
{
if ($message instanceof Progress) {
if ($this->console->attached()) {
if ($this->progressStartedLength) {
- 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 install
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function install()
{
$this->response->addContent('Installing');
$request = Request::createAuto();
Method processToken
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function processToken()
{
$optionFound = null;
if (($optionName = $this->token->afterStarts(Runner::OPTION_NAME)) && isset($this->def->byName[$optionName])) {
$optionFound = $this->def->byName[$optionName];
Method run
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run(Request $request = null)
{
if (null === $request) {
$request = Request::createAuto();
}
Method getColumns
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getColumns($tableName) {
//echo PHP_EOL . 'table: ' . $tableName . PHP_EOL;
$res = $this->database
->select()
->select('c.column_name, c.is_nullable, c.data_type, c.column_default, tc.constraint_type')
Method parseColumn
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function parseColumn(Parser $parser) {
$columnName = $parser->inner(null, array(' ',"\r", "\n", "\t"));
$columnName = (string)$this->resolve(trim($columnName));
$type = (string)$parser->inner(null, ' ');
Method readIndexes
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function readIndexes(Table $def) {
$res = $this->database->select()
->select('t.relname as table_name, i.relname as index_name, a.attname as column_name')
->select('ix.indisunique::int as is_unique,ix.indisprimary::int as is_primary')
->from('pg_class t, pg_class i, pg_index ix, pg_attribute a')
Method build
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function build(Quoter $quoter = null)
{
if (null === $quoter) {
$quoter = $this->database()->getDriver();
}
Method getTableDefinition
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTableDefinition($tableName) {
$tableSymbol = new Symbol($tableName);
$res = $this->database->query("DESC ?", $tableSymbol);
$columns = new \stdClass();
while ($row = $res->fetchRow()) {
Method current
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function current()
{
$row = parent::current();
if ($this->callback) {
$row = $this->callback->__invoke($row);
Function processIndexes
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected function processIndexes()
{
/** @var Index[] $beforeIndexes */
$beforeIndexes = array();
foreach ($this->before->indexes as $index) {
- 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 createFromFuncArguments
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static function createFromFuncArguments($arguments, $operation = ' ')
{
if (empty($arguments)) {
return new static();
}
- 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 processColumns
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function processColumns()
{
$beforeColumns = $this->before->getColumns(true, true);
foreach ($this->after->getColumns(true, true) as $columnName => $afterColumn) {
$afterTypeString = $afterColumn->getTypeString();
Method backTrace
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function backTrace($skip = 0, $return = self::TRACE_HTML)
{
//if (!self::$isActive) {
// return '';
// }