AbstractAdapter::getCount()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * @company MTE Telecom, Ltd.
4
 * @author Roman Malashin <[email protected]>
5
 */
6
7
namespace Nnx\DataGrid\Adapter;
8
9
use Nnx\DataGrid\Condition\Conditions;
10
use Doctrine\Common\Collections\ArrayCollection;
11
use ArrayAccess;
12
use Traversable;
13
14
/**
15
 * Class AbstractAdapter
16
 * @package Nnx\DataGrid\Adapter
17
 */
18
class AbstractAdapter implements AdapterInterface
19
{
20
    /**
21
     * @var Conditions
22
     */
23
    protected $conditions;
24
25
    /**
26
     * @var int
27
     */
28
    protected $count;
29
30
    /**
31
     * @var array | ArrayAccess | Traversable
32
     */
33
    protected $options;
34
35
36
    /**
37
     * @return array | ArrayCollection
0 ignored issues
show
Documentation introduced by
Should the return type not be array|null?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
38
     */
39
    public function getData()
40
    {
41
    }
42
43
    /**
44
     * @return mixed
45
     */
46
    public function init()
47
    {
48
    }
49
50
    /**
51
     * Возвращает количество записей
52
     * @return int
53
     */
54
    public function getCount()
55
    {
56
        return $this->count;
57
    }
58
59
    /**
60
     * @param Conditions $conditions
61
     * @return mixed
62
     */
63
    public function setConditions(Conditions $conditions)
64
    {
65
        $this->conditions = $conditions;
66
        return $this;
67
    }
68
69
    /**
70
     * @return Conditions
71
     */
72
    public function getConditions()
73
    {
74
        return $this->conditions;
75
    }
76
77
    /**
78
     * Устанавливает опции для адаптера
79
     * @param array | ArrayAccess | Traversable $options
80
     * @return $this
81
     */
82
    public function setOptions($options)
83
    {
84
        $this->options = $options;
85
        return $this;
86
    }
87
88
    /**
89
     * Возвращает опции адаптера
90
     * @return array | ArrayAccess | Traversable
91
     */
92
    public function getOptions()
93
    {
94
        return $this->options;
95
    }
96
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
97