Code Duplication    Length = 13-13 lines in 2 locations

src/Api/Operator/Database.php 1 location

@@ 116-128 (lines=13) @@
113
     * @param $value
114
     * @return \PleskX\Api\XmlResponse
115
     */
116
    private function _get($command, $field, $value)
117
    {
118
        $packet = $this->_client->getPacket();
119
        $getTag = $packet->addChild($this->_wrapperTag)->addChild($command);
120
121
        $filterTag = $getTag->addChild('filter');
122
        if (!is_null($field)) {
123
            $filterTag->addChild($field, $value);
124
        }
125
126
        $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL);
127
        return $response;
128
    }
129
130
    /**
131
     * @param string $field

src/Api/Operator/ProtectedDirectory.php 1 location

@@ 101-113 (lines=13) @@
98
     * @param $value
99
     * @return \PleskX\Api\XmlResponse
100
     */
101
    private function _get($command, $field, $value)
102
    {
103
        $packet = $this->_client->getPacket();
104
        $getTag = $packet->addChild($this->_wrapperTag)->addChild($command);
105
106
        $filterTag = $getTag->addChild('filter');
107
        if (!is_null($field)) {
108
            $filterTag->addChild($field, $value);
109
        }
110
111
        $response = $this->_client->request($packet, \PleskX\Api\Client::RESPONSE_FULL);
112
        return $response;
113
    }
114
115
}
116