Code Duplication    Length = 13-13 lines in 2 locations

src/Api/Operator/Database.php 1 location

@@ 131-143 (lines=13) @@
128
     *
129
     * @return \PleskX\Api\XmlResponse
130
     */
131
    private function _get($command, $field, $value)
132
    {
133
        $packet = $this->_client->getPacket();
134
        $getTag = $packet->addChild($this->_wrapperTag)->addChild($command);
135
136
        $filterTag = $getTag->addChild('filter');
137
        if (!is_null($field)) {
138
            $filterTag->addChild($field, $value);
139
        }
140
141
        $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL);
142
143
        return $response;
144
    }
145
146
    /**

src/Api/Operator/ProtectedDirectory.php 1 location

@@ 109-121 (lines=13) @@
106
     *
107
     * @return \PleskX\Api\XmlResponse
108
     */
109
    private function _get($command, $field, $value)
110
    {
111
        $packet = $this->_client->getPacket();
112
        $getTag = $packet->addChild($this->_wrapperTag)->addChild($command);
113
114
        $filterTag = $getTag->addChild('filter');
115
        if (!is_null($field)) {
116
            $filterTag->addChild($field, $value);
117
        }
118
119
        $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL);
120
121
        return $response;
122
    }
123
}
124