Code Duplication    Length = 51-51 lines in 2 locations

src/Response/V1x/BulkResponse.php 1 location

@@ 28-78 (lines=51) @@
25
 * @package Elastification\Client\Response\V1x
26
 * @author  Daniel Wendlandt
27
 */
28
class BulkResponse extends Response
29
{
30
    const PROP_TOOK = 'took';
31
    const PROP_ERRORS = 'errors';
32
    const PROP_ITEMS = 'items';
33
34
    const PROP_INDEX = '_index';
35
    const PROP_TYPE = '_type';
36
    const PROP_ID = '_id';
37
    const PROP_VERSION = '_version';
38
    const PROP_STATUS = 'status';
39
40
    /**
41
     * Getter Method
42
     *
43
     * @return mixed
44
     * @author Daniel Wendlandt
45
     */
46
    public function took()
47
    {
48
        $this->processData();
49
50
        return $this->get(self::PROP_TOOK);
51
    }
52
53
    /**
54
     * Getter Method
55
     *
56
     * @return bool
57
     * @author Daniel Wendlandt
58
     */
59
    public function errors()
60
    {
61
        $this->processData();
62
63
        return $this->get(self::PROP_ERRORS);
64
    }
65
66
    /**
67
     * Getter Method
68
     *
69
     * @return mixed
70
     * @author Daniel Wendlandt
71
     */
72
    public function getItems()
73
    {
74
        $this->processData();
75
76
        return $this->get(self::PROP_ITEMS);
77
    }
78
}
79

src/Response/V2x/BulkResponse.php 1 location

@@ 28-78 (lines=51) @@
25
 * @package Elastification\Client\Response\V2x
26
 * @author  Daniel Wendlandt
27
 */
28
class BulkResponse extends Response
29
{
30
    const PROP_TOOK = 'took';
31
    const PROP_ERRORS = 'errors';
32
    const PROP_ITEMS = 'items';
33
34
    const PROP_INDEX = '_index';
35
    const PROP_TYPE = '_type';
36
    const PROP_ID = '_id';
37
    const PROP_VERSION = '_version';
38
    const PROP_STATUS = 'status';
39
40
    /**
41
     * Getter Method
42
     *
43
     * @return mixed
44
     * @author Daniel Wendlandt
45
     */
46
    public function took()
47
    {
48
        $this->processData();
49
50
        return $this->get(self::PROP_TOOK);
51
    }
52
53
    /**
54
     * Getter Method
55
     *
56
     * @return bool
57
     * @author Daniel Wendlandt
58
     */
59
    public function errors()
60
    {
61
        $this->processData();
62
63
        return $this->get(self::PROP_ERRORS);
64
    }
65
66
    /**
67
     * Getter Method
68
     *
69
     * @return mixed
70
     * @author Daniel Wendlandt
71
     */
72
    public function getItems()
73
    {
74
        $this->processData();
75
76
        return $this->get(self::PROP_ITEMS);
77
    }
78
}
79