Code Duplication    Length = 9-10 lines in 2 locations

src/EoC/Couch.php 2 locations

@@ 1095-1104 (lines=10) @@
1092
   * @see http://docs.couchdb.org/en/latest/api/document/common.html#db-doc
1093
   * @bug CouchDB ETag is
1094
   */
1095
  public function getDocEtag($dbName, $docId) {
1096
    $this->validateAndEncodeDocId($docId);
1097
1098
    $path = "/".rawurlencode($this->prefix.$dbName)."/".$docId;
1099
1100
    $request = new Request(Request::HEAD_METHOD, $path);
1101
1102
    // CouchDB ETag is included between quotation marks.
1103
    return trim($this->send($request)->getHeaderFieldValue(Response::ETAG_HF), '"');
1104
  }
1105
1106
1107
  /**
@@ 1470-1478 (lines=9) @@
1467
   * @retval array An associative array
1468
   * @see http://docs.couchdb.org/en/latest/api/ddoc/common.html#get--db-_design-ddoc-_info
1469
   */
1470
  public function getDesignDocInfo($dbName, $docName) {
1471
    $this->validateAndEncodeDocId($docName);
1472
1473
    $path = "/".rawurlencode($this->prefix.$dbName)."/".self::DESIGN_DOC_PATH.$docName."/_info";
1474
1475
    $request = new Request(Request::GET_METHOD, $path);
1476
1477
    return $this->send($request)->getBodyAsArray();
1478
  }
1479
1480
1481
  /**