Showing 203 of 203 total issues
Method echoBash
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function echoBash() {
?>
for opt in <?php echo $this->optionsStrings[Runner::GROUP_MISC] ?>; do
if [[ $opt == $prev ]]; then
return 0
Method setUpErrorHandling
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function setUpErrorHandling()
{
$app = $this;
$errorLevels = array(
E_ERROR => 'error',
Method addContent
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function addContent($message)
{
if ($message instanceof Progress) {
if ($this->console->attached()) {
if ($this->progressStartedLength) {
Method processColumns
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function processColumns()
{
$this->alterLines->disable();
$intersect = array();
Method castField
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function castField($value, $columnFlags, $import = true)
{
if (!($columnFlags & self::NOT_NULL) && $value === null) {
return null;
}
Function makeAnchor
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function makeAnchor(array $properties)
{
if (!$properties) {
throw new Command\Exception('Unable to make anchor, no properties');
}
- 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 __set
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __set($name, $column)
{
if (is_int($column)) {
$column = new Column($column);
//$this->_arrayOfColumnData[$name] = $column;
Method read
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function read(Request $request, array $options)
{
$this->def = new PrepareDefinition($options);
$tokens = $request->server()->argv;
Method getTypeByString
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTypeByString($type) {
$phpType = Column::STRING;
$type = strtoupper($type);
switch (true) {
case 'BIGINT' === substr($type, 0, 6):
Method strPos
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function strPos($haystack, $needles, $offset = 0, $reverse = false, $ignoreCase = false)
{
self::$strPosLastFound = null;
$result = false;
if (!is_array($needles)) {
Method createFromFuncArguments
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function createFromFuncArguments($arguments, $operation = ' ')
{
if (empty($arguments)) {
return new static();
}
Method buildValues
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function buildValues(Quoter $quoter)
{
$result = '';
if ($this->values) {
$fields = array();
Method run
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function run(Request $request = null)
{
if (null === $request) {
$request = Request::createAuto();
}
Method quote
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function quote($value)
{
if (null === $value) {
return 'NULL';
} elseif (is_int($value)) {
Function parseColumn
has a Cognitive Complexity of 11 (exceeds 5 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, ' ');
- 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 demand
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function demand($logout = false, $redirectOnLogoutUrl = null)
{
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="' . $this->settings->title . '"');
header('HTTP/1.0 401 Unauthorized');
- 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 run
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function run(Request $request = null)
{
if (null === $request) {
$request = Request::createAuto();
}
- 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 install
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function install()
{
$this->response->addContent('Installing');
$request = Request::createAuto();
- 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 getTableDefinition
has a Cognitive Complexity of 11 (exceeds 5 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()) {
- 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 getDriver
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function getDriver()
{
if (null === $this->driver) {
if ($this->settings && $this->settings->driverClassName) {
$driverClass = $this->settings->driverClassName;
- 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"