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

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