php-yaoi/php-yaoi

View on GitHub

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
Severity: Minor
Found in src/Cli/Command/Completion.php - About 1 hr to fix

    Method setUpErrorHandling has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function setUpErrorHandling()
        {
            $app = $this;
            $errorLevels = array(
                E_ERROR => 'error',
    Severity: Minor
    Found in src/App/Conf.php - About 1 hr to fix

      Method processColumns has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function processColumns()
          {
              $this->alterLines->disable();
      
              $intersect = array();
      Severity: Minor
      Found in src/Database/Sqlite/AlterTable.php - About 1 hr to fix

        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;
                }
        Severity: Minor
        Found in src/Database/Definition/Column.php - About 1 hr to fix

          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) {
          Severity: Minor
          Found in src/Cli/Response.php - About 1 hr to fix

            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');
                    }
            Severity: Minor
            Found in src/Command/Web/RequestMapper.php - About 1 hr to fix

            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 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;
            Severity: Minor
            Found in src/Cli/Command/RequestMapper.php - About 1 hr to fix

              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;
              Severity: Minor
              Found in src/Database/Definition/Columns.php - About 1 hr to fix

                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)) {
                Severity: Minor
                Found in src/String/Utils.php - About 1 hr to fix

                  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):
                  Severity: Minor
                  Found in src/Database/Mysql/CreateTableReader.php - About 1 hr to fix

                    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();
                            }
                    Severity: Minor
                    Found in src/Sql/SimpleExpression.php - About 1 hr to fix

                      Method buildValues has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          protected function buildValues(Quoter $quoter)
                          {
                              $result = '';
                              if ($this->values) {
                                  $fields = array();
                      Severity: Minor
                      Found in src/Sql/ComplexStatement.php - About 1 hr to fix

                        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();
                                }
                        Severity: Minor
                        Found in src/Cli/Command/Runner.php - About 1 hr to fix

                          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)) {
                          Severity: Minor
                          Found in src/Database/Driver.php - About 1 hr to fix

                            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');
                            Severity: Minor
                            Found in src/Http/Auth.php - About 1 hr to fix

                            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 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, ' ');
                            Severity: Minor
                            Found in src/Database/Mysql/CreateTableReader.php - About 1 hr to fix

                            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()) {
                            Severity: Minor
                            Found in src/Database/Mysql/SchemaReader.php - About 1 hr to fix

                            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();
                            Severity: Minor
                            Found in src/Cli/Command/Runner.php - About 1 hr to fix

                            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();
                                    }
                            Severity: Minor
                            Found in src/Cli/Command/Application/Runner.php - About 1 hr to fix

                            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 delete has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function delete($key)
                                {
                                    if (is_array($key)) {
                                        $kk = & $this->data;
                                        $lastKey = null;
                            Severity: Minor
                            Found in src/Storage/Driver/PhpVar.php - About 1 hr to fix

                            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

                            Severity
                            Category
                            Status
                            Source
                            Language