Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Test Failed
Push — optimize-queries ( 9b3855 )
by Pedro
12:20
created

CrudTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
dl 0
loc 25
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A hasCrudTrait() 0 3 1
A newBaseQueryBuilder() 0 6 1
1
<?php
2
3
namespace Backpack\CRUD\app\Models\Traits;
4
5
use Backpack\CRUD\app\Library\Database\QueryBuilder;
6
7
trait CrudTrait
8
{
9
    use HasIdentifiableAttribute;
10
    use HasEnumFields;
11
    use HasRelationshipFields;
12
    use HasUploadFields;
13
    use HasFakeFields;
14
    use HasTranslatableFields;
15
16
    public static function hasCrudTrait()
17
    {
18
        return true;
19
    }
20
21
    /**
22
     * Get a new query builder instance for the connection.
23
     *
24
     * @return \Illuminate\Database\Query\Builder
25
     */
26
    protected function newBaseQueryBuilder()
27
    {
28
        $connection = $this->getConnection();
0 ignored issues
show
Bug introduced by
The method getConnection() does not exist on Backpack\CRUD\app\Models\Traits\CrudTrait. Did you maybe mean getConnectionWithExtraTypeMappings()? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

28
        /** @scrutinizer ignore-call */ 
29
        $connection = $this->getConnection();

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
29
30
        return new QueryBuilder(
31
            $connection, $connection->getQueryGrammar(), $connection->getPostProcessor()
32
        );
33
    }
34
}
35