Passed
Pull Request — master (#12)
by Bas
02:32
created

NormalizesArrayFunctions   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 20
ccs 11
cts 11
cp 1
rs 10
c 1
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A normalizeFirst() 0 3 1
A normalizeLast() 0 3 1
A normalizeCountDistinct() 0 3 1
A normalizeLength() 0 3 1
1
<?php
2
3
namespace LaravelFreelancerNL\FluentAQL\Traits;
4
5
use LaravelFreelancerNL\FluentAQL\QueryBuilder;
6
7
/**
8
 * Trait hasFunctions.
9
 *
10
 * AQL Function API calls.
11
 */
12
trait NormalizesArrayFunctions
13
{
14 2
    protected function normalizeFirst(QueryBuilder $queryBuilder)
15
    {
16 2
        $this->normalizeArrays($queryBuilder);
0 ignored issues
show
Bug introduced by
The method normalizeArrays() does not exist on LaravelFreelancerNL\Flue...ormalizesArrayFunctions. Did you maybe mean normalizeLast()? ( Ignorable by Annotation )

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

16
        $this->/** @scrutinizer ignore-call */ 
17
               normalizeArrays($queryBuilder);

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...
17 2
    }
18
19 1
    protected function normalizeLast(QueryBuilder $queryBuilder)
20
    {
21 1
        $this->normalizeArrays($queryBuilder);
22 1
    }
23
24 2
    protected function normalizeLength(QueryBuilder $queryBuilder)
25
    {
26 2
        $this->normalizeArrays($queryBuilder);
27 2
    }
28
29 1
    protected function normalizeCountDistinct(QueryBuilder $queryBuilder)
30
    {
31 1
        $this->normalizeArrays($queryBuilder);
32 1
    }
33
}
34