Luke   A
last analyzed

Complexity

Total Complexity 9

Size/Duplication

Total Lines 74
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 9
lcom 0
cbo 1
dl 0
loc 74
ccs 0
cts 36
cp 0
rs 10
c 0
b 0
f 0

9 Methods

Rating   Name   Duplication   Size   Complexity  
A numDocs() 0 4 1
A maxDoc() 0 4 1
A numTerms() 0 4 1
A version() 0 4 1
A segmentCount() 0 4 1
A isCurrent() 0 4 1
A hasDeletions() 0 4 1
A directory() 0 4 1
A lastModified() 0 4 1
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
}