Test Failed
Push — master ( f235c1...2c36df )
by Nuno
01:49
created

BuilderMethodExtension   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A subject() 0 3 1
A searchIn() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * This file is part of Laravel Code Analyse.
7
 *
8
 * (c) Nuno Maduro <[email protected]>
9
 *
10
 *  For the full copyright and license information, please view the LICENSE
11
 *  file that was distributed with this source code.
12
 */
13
14
namespace NunoMaduro\LaravelCodeAnalyse\Database\Eloquent;
15
16
use PHPStan\Reflection\ClassReflection;
17
use NunoMaduro\LaravelCodeAnalyse\AbstractExtension;
18
use Illuminate\Database\Query\Builder as QueryBuilder;
19
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
20
21
final class BuilderMethodExtension extends AbstractExtension
22
{
23
    /**
24
     * {@inheritdoc}
25
     */
26
    protected $staticAccess = true;
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    protected function subject(): string
32
    {
33
        return EloquentBuilder::class;
34
    }
35
36
    /**
37
     * {@inheritdoc}
38
     */
39
    protected function searchIn(ClassReflection $classReflection): array
40
    {
41
        return [
42
            QueryBuilder::class,
43
        ];
44
    }
45
}
46