YetiForceCompany/YetiForceCRM

View on GitHub
app/Db/Query.php

Summary

Maintainability
A
0 mins
Test Coverage
D
66%

Avoid using static access to class '\Yii' in method 'each'.
Open

        return \Yii::createObject([
            'class' => \yii\db\BatchQueryResult::class,
            'query' => $this,
            'batchSize' => $batchSize,
            'db' => $db,
Severity: Minor
Found in app/Db/Query.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\App\Db' in method 'each'.
Open

            $db = \App\Db::getInstance();
Severity: Minor
Found in app/Db/Query.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\Yii' in method 'batch'.
Open

        return \Yii::createObject([
            'class' => \yii\db\BatchQueryResult::className(),
            'query' => $this,
            'batchSize' => $batchSize,
            'db' => $db,
Severity: Minor
Found in app/Db/Query.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\yii\db\BatchQueryResult' in method 'batch'.
Open

            'class' => \yii\db\BatchQueryResult::className(),
Severity: Minor
Found in app/Db/Query.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\App\Db' in method 'createCommand'.
Open

            $db = \App\Db::getInstance();
Severity: Minor
Found in app/Db/Query.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\App\Db' in method 'batch'.
Open

            $db = \App\Db::getInstance();
Severity: Minor
Found in app/Db/Query.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Static call to undeclared method \Yii::createObject
Open

        return \Yii::createObject([
Severity: Critical
Found in app/Db/Query.php by phan

Reference to undeclared property \App\Db\Query->having
Open

        && empty($this->having)
Severity: Minor
Found in app/Db/Query.php by phan

Call to undeclared method \App\Db\Query::setCommandCache
Open

        $this->setCommandCache($command);
Severity: Critical
Found in app/Db/Query.php by phan

Reference to undeclared property \App\Db\Query->union
Open

        && empty($this->union)) {
Severity: Minor
Found in app/Db/Query.php by phan

Call to undeclared method \App\Db::getQueryBuilder
Open

        [$sql, $params] = $db->getQueryBuilder()->build($this);
Severity: Critical
Found in app/Db/Query.php by phan

Call to method className from undeclared class \yii\db\BatchQueryResult
Open

            'class' => \yii\db\BatchQueryResult::className(),
Severity: Critical
Found in app/Db/Query.php by phan

Call to undeclared method \App\Db\Query::select
Open

        $command = (new static())
Severity: Critical
Found in app/Db/Query.php by phan

Call to undeclared method \App\Db\Query::limit
Open

        return $this->limit(1)->createCommand($db)->queryOne();
Severity: Critical
Found in app/Db/Query.php by phan

Reference to undeclared property \App\Db\Query->distinct
Open

        if (!$this->distinct
Severity: Minor
Found in app/Db/Query.php by phan

Reference to undeclared property \App\Db\Query->groupBy
Open

        && empty($this->groupBy)
Severity: Minor
Found in app/Db/Query.php by phan

Static call to undeclared method \Yii::createObject
Open

        return \Yii::createObject([
Severity: Critical
Found in app/Db/Query.php by phan

Call to undeclared method \App\Db::createCommand
Open

        return $db->createCommand($sql, $params);
Severity: Critical
Found in app/Db/Query.php by phan

Class extends undeclared class \yii\db\Query (Did you mean class \App\Db\Query)
Open

class Query extends \yii\db\Query
Severity: Critical
Found in app/Db/Query.php by phan

Reference to constant class from undeclared class \yii\db\BatchQueryResult
Open

            'class' => \yii\db\BatchQueryResult::class,
Severity: Critical
Found in app/Db/Query.php by phan

Reference to undeclared class \yii\db\Query (Did you mean class \App\Db\Query)
Open

            return parent::queryScalar($selectExpression, $db);
Severity: Critical
Found in app/Db/Query.php by phan

Return type of each() is undeclared type \yii\db\BatchQueryResult
Open

    public function each($batchSize = 100, $db = null)
Severity: Minor
Found in app/Db/Query.php by phan

Return type of batch() is undeclared type \yii\db\BatchQueryResult
Open

    public function batch($batchSize = 100, $db = null)
Severity: Minor
Found in app/Db/Query.php by phan

Call to undeclared method \App\Db\Query::limit
Open

        return $this->limit(1)->createCommand($db)->queryScalar();
Severity: Critical
Found in app/Db/Query.php by phan

Parameter $selectExpression has undeclared type \App\Db\ExpressionInterface
Open

    protected function queryScalar($selectExpression, $db)
Severity: Minor
Found in app/Db/Query.php by phan

Avoid variables with short names like $db. Configured minimum length is 3.
Open

    public function batch($batchSize = 100, $db = null)
Severity: Minor
Found in app/Db/Query.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $db. Configured minimum length is 3.
Open

    public function one($db = null)
Severity: Minor
Found in app/Db/Query.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $db. Configured minimum length is 3.
Open

    public function scalar($db = null)
Severity: Minor
Found in app/Db/Query.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $db. Configured minimum length is 3.
Open

    public function createCommand($db = null)
Severity: Minor
Found in app/Db/Query.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $db. Configured minimum length is 3.
Open

    protected function queryScalar($selectExpression, $db)
Severity: Minor
Found in app/Db/Query.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $db. Configured minimum length is 3.
Open

    public function each($batchSize = 100, $db = null)
Severity: Minor
Found in app/Db/Query.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Spaces must be used to indent lines; tabs are not allowed
Open

     *                                  and can be traversed to retrieve the data in batches.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return \Yii::createObject([
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            'batchSize' => $batchSize,
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        ]);
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Creates a DB command that can be used to execute this query.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public function createCommand($db = null)
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $db = \App\Db::getInstance();
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * A batch query supports fetching data in batches, which can keep the memory usage under a limit.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            'query' => $this,
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (null === $db) {
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * and can be traversed to retrieve the data in batches.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (null === $db) {
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return $db->createCommand($sql, $params);
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param int     $batchSize the number of records to be fetched in each batch.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return \yii\db\BatchQueryResult the batch query result. It implements the [[\Iterator]] interface
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param \App\Db $db the database connection used to generate the SQL statement.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * This method will return a [[BatchQueryResult]] object which implements the [[\Iterator]] interface
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            'db' => $db,
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return Command the created DB command instance.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Starts a batch query.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public function batch($batchSize = 100, $db = null)
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        [$sql, $params] = $db->getQueryBuilder()->build($this);
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $db = \App\Db::getInstance();
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            'class' => \yii\db\BatchQueryResult::className(),
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            'each' => false,
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param int     $batchSize the number of records to be fetched in each batch.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return \yii\db\BatchQueryResult the batch query result. It implements the [[\Iterator]] interface
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            'query' => $this,
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param string|ExpressionInterface $selectExpression
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param \App\Db|null               $db
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public function each($batchSize = 100, $db = null)
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return \Yii::createObject([
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            'db' => $db,
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return $this->limit(1)->createCommand($db)->queryOne();
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Returns the query result as a scalar value.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param \App\Db $db the database connection used to generate the SQL statement.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            ->select([$selectExpression])
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            ->createCommand($db);
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param \App\Db $db        the database connection. If not set, the "db" application component will be used.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * only one row of data is returned. For example,
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param \App\Db $db        the database connection. If not set, the "db" application component will be used.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *                                  and can be traversed to retrieve the data in batches.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *                    If this parameter is not given, the `db` application component will be used.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return string|false|null the value of the first column in the first row of the query result.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (!$this->distinct
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return $command->queryScalar();
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *                    results in nothing.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Restores the value of select to make this query reusable.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $command = (new static())
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return bool|string
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            'class' => \yii\db\BatchQueryResult::class,
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public function scalar($db = null)
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        if (null === $db) {
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    protected function queryScalar($selectExpression, $db)
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        && empty($this->union)) {
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            ->from(['c' => $this])
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Executes the query and returns a single row of result.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->setCommandCache($command);
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *                    If this parameter is not given, the `db` application component will be used.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Queries a scalar value by setting [[select]] first.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *                    If this parameter is not given, the `db` application component will be used.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            'batchSize' => $batchSize,
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @param \App\Db $db the database connection used to generate the SQL statement.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            return parent::queryScalar($selectExpression, $db);
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * The value returned will be the first column in the first row of the query results.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * This method is similar to [[batch()]] except that in each iteration of the result,
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            'each' => true,
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        ]);
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * @return array|bool the first row (in terms of an array) of the query result. False is returned if the query
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        return $this->limit(1)->createCommand($db)->queryScalar();
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        && empty($this->groupBy)
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        }
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Starts a batch query and retrieves data row by row.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

            $db = \App\Db::getInstance();
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public function one($db = null)
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     *                           False is returned if the query result is empty.
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        && empty($this->having)
Severity: Minor
Found in app/Db/Query.php by phpcodesniffer

There are no issues that match your filters.

Category
Status