Passed
Push — master ( 515b37...de0f46 )
by Alex
01:35 queued 12s
created

IsNotEqualTest::testFilterWillApplyIsNotEqualFiltering()   A

Complexity

Conditions 4
Paths 8

Size

Total Lines 58
Code Lines 40

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 40
c 1
b 0
f 0
dl 0
loc 58
rs 9.28
cc 4
nc 8
nop 0

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
declare(strict_types=1);
4
5
namespace ArpTest\DoctrineQueryFilter\Filter;
6
7
use Arp\DoctrineQueryFilter\Filter\IsNotEqual;
8
9
/**
10
 * @covers \Arp\DoctrineQueryFilter\Filter\IsNotEqual
11
 * @covers \Arp\DoctrineQueryFilter\Filter\AbstractExpression
12
 * @covers \Arp\DoctrineQueryFilter\Filter\AbstractFilter
13
 *
14
 * @author  Alex Patterson <[email protected]>
15
 * @package ArpTest\DoctrineQueryFilter\Filter
16
 */
17
final class IsNotEqualTest extends AbstractComparisonTest
18
{
19
    /**
20
     * @var string
21
     */
22
    protected string $filterClassName = IsNotEqual::class;
23
24
    /**
25
     * @var string
26
     */
27
    protected string $expressionMethodName = 'neq';
28
29
    /**
30
     * @var string
31
     */
32
    protected string $expressionSymbol = '!=';
33
34
    /**
35
     * @return array<mixed>
36
     */
37
    public function getFilterWillApplyFilteringData(): array
38
    {
39
        return [
40
            [
41
                [
42
                    'name' => 'test',
43
                    'field' => 'hello',
44
                    'value' => 123,
45
                ],
46
            ],
47
        ];
48
    }
49
}
50