Code Duplication    Length = 8-8 lines in 3 locations

Result/Aggregation/AggregationValue.php 2 locations

@@ 41-48 (lines=8) @@
38
     *
39
     * @return array
40
     */
41
    public function getValue($name = 'key')
42
    {
43
        if (!isset($this->rawData[$name])) {
44
            return null;
45
        }
46
47
        return $this->rawData[$name];
48
    }
49
50
    /**
51
     * Returns the document count of the aggregation
@@ 87-94 (lines=8) @@
84
     *
85
     * @return AggregationValue|null
86
     */
87
    public function getAggregation($name)
88
    {
89
        if (!isset($this->rawData[$name])) {
90
            return null;
91
        }
92
93
        return new self($this->rawData[$name]);
94
    }
95
96
    /**
97
     * Applies path method to aggregations.

Result/InnerHitValue.php 1 location

@@ 91-98 (lines=8) @@
88
     *
89
     * @return integer
90
     */
91
    public function getCount($name)
92
    {
93
        if (!isset($this->rawData[$name])) {
94
            return null;
95
        }
96
97
        return $this->rawData[$name]['hits']['total'];
98
    }
99
100
    /**
101
     * Returns inner hits for a specified inner hit