Luke::numDocs()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace PSolr\Response;
4
5
class Luke extends Response
6
{
7
    /**
8
     * @return int
9
     */
10
    public function numDocs()
11
    {
12
        return $this['index']['numDocs'];
13
    }
14
15
    /**
16
     * @return int
17
     */
18
    public function maxDoc()
19
    {
20
        return $this['index']['maxDoc'];
21
    }
22
23
    /**
24
     * @return int
25
     */
26
    public function numTerms()
27
    {
28
        return $this['index']['numTerms'];
29
    }
30
31
    /**
32
     * @return double
33
     */
34
    public function version()
35
    {
36
        return $this['index']['version'];
37
    }
38
39
    /**
40
     * @return int
41
     */
42
    public function segmentCount()
43
    {
44
        return $this['index']['segmentCount'];
45
    }
46
47
    /**
48
     * @return bool
49
     */
50
    public function isCurrent()
51
    {
52
        return $this['index']['current'];
53
    }
54
55
    /**
56
     * @return bool
57
     */
58
    public function hasDeletions()
59
    {
60
        return $this['index']['hasDeletions'];
61
    }
62
63
    /**
64
     * @return string
65
     */
66
    public function directory()
67
    {
68
        return $this['index']['directory'];
69
    }
70
71
    /**
72
     * @return \DateTime
73
     */
74
    public function lastModified()
75
    {
76
        return new \DateTime($this['index']['lastModified']);
77
    }
78
}