Code Duplication    Length = 9-9 lines in 3 locations

src/Api/Operator/Database.php 2 locations

@@ 85-93 (lines=9) @@
82
     * @param integer|string $value
83
     * @return Struct\Info[]
84
     */
85
    public function getAll($field, $value)
86
    {
87
        $response = $this->_get('get-db', $field, $value);
88
        $items = [];
89
        foreach ($response->xpath('//result') as $xmlResult) {
90
            $items[] = new Struct\Info($xmlResult);
91
        }
92
        return $items;
93
    }
94
95
    /**
96
     * @param string $field
@@ 100-108 (lines=9) @@
97
     * @param integer|string $value
98
     * @return Struct\UserInfo[]
99
     */
100
    public function getAllUsers($field, $value)
101
    {
102
        $response = $this->_get('get-db-users', $field, $value);
103
        $items = [];
104
        foreach ($response->xpath('//result') as $xmlResult) {
105
            $items[] = new Struct\UserInfo($xmlResult);
106
        }
107
        return $items;
108
    }
109
110
    /**
111
     * @param $command

src/Api/Operator/ProtectedDirectory.php 1 location

@@ 57-65 (lines=9) @@
54
     * @param integer|string $value
55
     * @return Struct\DataInfo[]
56
     */
57
    public function getAll($field, $value)
58
    {
59
        $response = $this->_get('get', $field, $value);
60
        $items = [];
61
        foreach ($response->xpath('//result/data') as $xmlResult) {
62
            $items[] = new Struct\DataInfo($xmlResult);
63
        }
64
        return $items;
65
    }
66
67
    /**
68
     * @param Struct\Info $protectedDirectory