Failed Conditions
Push — master ( e341c2...878df1 )
by Bas
12:12
created

NormalizesDateFunctions::normalizeDateMinute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 10
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 NormalizesDateFunctions
13
{
14 3
    protected function normalizeDateIso8601(QueryBuilder $queryBuilder)
15
    {
16 3
        $this->normalizeNumbers($queryBuilder);
0 ignored issues
show
Bug introduced by
The method normalizeNumbers() does not exist on LaravelFreelancerNL\Flue...NormalizesDateFunctions. Did you maybe mean normalizeDateHour()? ( 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
               normalizeNumbers($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 3
    }
18
19 3
    protected function normalizeDateTimestamp(QueryBuilder $queryBuilder)
20
    {
21 3
        $this->normalizeNumbers($queryBuilder);
22 3
    }
23
24 1
    protected function normalizeDateYear(QueryBuilder $queryBuilder)
25
    {
26 1
        $this->parameters[0] = $queryBuilder->normalizeArgument(
0 ignored issues
show
Bug Best Practice introduced by
The property parameters does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
27 1
            $this->parameters[0],
28 1
            ['Number', 'Function', 'Query', 'Reference', 'Bind']
29
        );
30 1
    }
31
32 1
    protected function normalizeDateMonth(QueryBuilder $queryBuilder)
33
    {
34 1
        $this->parameters[0] = $queryBuilder->normalizeArgument(
0 ignored issues
show
Bug Best Practice introduced by
The property parameters does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
35 1
            $this->parameters[0],
36 1
            ['Number', 'Function', 'Query', 'Reference', 'Bind']
37
        );
38 1
    }
39
40 1
    protected function normalizeDateDay(QueryBuilder $queryBuilder)
41
    {
42 1
        $this->parameters[0] = $queryBuilder->normalizeArgument(
0 ignored issues
show
Bug Best Practice introduced by
The property parameters does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
43 1
            $this->parameters[0],
44 1
            ['Number', 'Function', 'Query', 'Reference', 'Bind']
45
        );
46 1
    }
47
48 1
    protected function normalizeDateHour(QueryBuilder $queryBuilder)
49
    {
50 1
        $this->parameters[0] = $queryBuilder->normalizeArgument(
0 ignored issues
show
Bug Best Practice introduced by
The property parameters does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
51 1
            $this->parameters[0],
52 1
            ['Number', 'Function', 'Query', 'Reference', 'Bind']
53
        );
54 1
    }
55
56 1
    protected function normalizeDateMinute(QueryBuilder $queryBuilder)
57
    {
58 1
        $this->parameters[0] = $queryBuilder->normalizeArgument(
0 ignored issues
show
Bug Best Practice introduced by
The property parameters does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
59 1
            $this->parameters[0],
60 1
            ['Number', 'Function', 'Query', 'Reference', 'Bind']
61
        );
62 1
    }
63
64 1
    protected function normalizeDateSecond(QueryBuilder $queryBuilder)
65
    {
66 1
        $this->parameters[0] = $queryBuilder->normalizeArgument(
0 ignored issues
show
Bug Best Practice introduced by
The property parameters does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
67 1
            $this->parameters[0],
68 1
            ['Number', 'Function', 'Query', 'Reference', 'Bind']
69
        );
70 1
    }
71
72 1
    protected function normalizeDateMillisecond(QueryBuilder $queryBuilder)
73
    {
74 1
        $this->parameters[0] = $queryBuilder->normalizeArgument(
0 ignored issues
show
Bug Best Practice introduced by
The property parameters does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
75 1
            $this->parameters[0],
76 1
            ['Number', 'Function', 'Query', 'Reference', 'Bind']
77
        );
78 1
    }
79
80 1
    protected function normalizeDateFormat(QueryBuilder $queryBuilder)
81
    {
82 1
        $this->parameters[0] = $queryBuilder->normalizeArgument(
0 ignored issues
show
Bug Best Practice introduced by
The property parameters does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
83 1
            $this->parameters[0],
84 1
            ['Number', 'Function', 'Query', 'Reference', 'Bind']
85
        );
86
87 1
        $this->parameters[1] = $queryBuilder->normalizeArgument(
88 1
            $this->parameters[1],
89 1
            ['Function', 'Query', 'Reference', 'Bind']
90
        );
91 1
    }
92
}
93