Completed
Push — master ( 2cb161...6e1af5 )
by Filippo
02:40 queued 01:07
created
src/EoC/Doc/DesignDoc.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -189,6 +189,9 @@
 block discarded – undo
189 189
   }
190 190
 
191 191
 
192
+  /**
193
+   * @param string $value
194
+   */
192 195
   public function setLanguage($value) {
193 196
     if (!empty($value))
194 197
       $this->meta['language'] = strtolower((string)$value);
Please login to merge, or discard this patch.
src/EoC/Generator/UUID.php 2 patches
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -162,6 +162,11 @@  discard block
 block discarded – undo
162 162
   /*
163 163
    * Public API, convert a UUID from one format to another
164 164
    */
165
+
166
+  /**
167
+   * @param integer $from
168
+   * @param integer $to
169
+   */
165 170
   static public function convert($uuid, $from, $to) {
166 171
     $conv = self::$m_convert[$from][$to];
167 172
     if (!isset($conv))
@@ -189,6 +194,11 @@  discard block
 block discarded – undo
189 194
   /*
190 195
    * Generate UUID version 3 and 5 (name based)
191 196
    */
197
+
198
+  /**
199
+   * @param string $hash
200
+   * @param integer $version
201
+   */
192 202
   static private function generateName($ns, $node, $hash, $version) {
193 203
     $ns_fmt = self::detectFormat($ns);
194 204
     $field = self::convert($ns, $ns_fmt, self::FMT_FIELD);
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -67,29 +67,29 @@  discard block
 block discarded – undo
67 67
  */
68 68
 class UUID {
69 69
   /* UUID versions */
70
-  const UUID_TIME	 = 1;	/* Time based UUID */
71
-  const UUID_NAME_MD5	 = 3;	/* Name based (MD5) UUID */
72
-  const UUID_RANDOM	 = 4;	/* Random UUID */
73
-  const UUID_NAME_SHA1	 = 5;	/* Name based (SHA1) UUID */
70
+  const UUID_TIME = 1; /* Time based UUID */
71
+  const UUID_NAME_MD5 = 3; /* Name based (MD5) UUID */
72
+  const UUID_RANDOM = 4; /* Random UUID */
73
+  const UUID_NAME_SHA1 = 5; /* Name based (SHA1) UUID */
74 74
 
75 75
   /* UUID formats */
76 76
   const FMT_FIELD	 = 100;
77 77
   const FMT_STRING	 = 101;
78 78
   const FMT_BINARY	 = 102;
79
-  const FMT_QWORD	 = 1;	/* Quad-word, 128-bit (not impl.) */
80
-  const FMT_DWORD	 = 2;	/* Double-word, 64-bit (not impl.) */
81
-  const FMT_WORD		 = 4;	/* Word, 32-bit (not impl.) */
82
-  const FMT_SHORT		= 8;	/* Short (not impl.) */
83
-  const FMT_BYTE		= 16;	/* Byte */
84
-  const FMT_DEFAULT	 = 16;
79
+  const FMT_QWORD	 = 1; /* Quad-word, 128-bit (not impl.) */
80
+  const FMT_DWORD	 = 2; /* Double-word, 64-bit (not impl.) */
81
+  const FMT_WORD		 = 4; /* Word, 32-bit (not impl.) */
82
+  const FMT_SHORT		= 8; /* Short (not impl.) */
83
+  const FMT_BYTE = 16; /* Byte */
84
+  const FMT_DEFAULT = 16;
85 85
 
86 86
   /* Field UUID representation */
87 87
   static private $m_uuid_field = array(
88
-    'time_low' => 0,		/* 32-bit */
89
-    'time_mid' => 0,		/* 16-bit */
90
-    'time_hi' => 0,			/* 16-bit */
91
-    'clock_seq_hi' => 0,		/*  8-bit */
92
-    'clock_seq_low' => 0,		/*  8-bit */
88
+    'time_low' => 0, /* 32-bit */
89
+    'time_mid' => 0, /* 16-bit */
90
+    'time_hi' => 0, /* 16-bit */
91
+    'clock_seq_hi' => 0, /*  8-bit */
92
+    'clock_seq_low' => 0, /*  8-bit */
93 93
     'node' => array()		/* 48-bit */
94 94
   );
95 95
 
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
     $uuid[9] = $src['clock_seq_low'];
285 285
 
286 286
     for ($i = 0; $i < 6; $i++)
287
-      $uuid[10+$i] = $src['node'][$i];
287
+      $uuid[10 + $i] = $src['node'][$i];
288 288
 
289 289
     return ($uuid);
290 290
   }
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
     $field['clock_seq_low'] = $uuid[9];
315 315
 
316 316
     for ($i = 0; $i < 6; $i++)
317
-      $field['node'][$i] = $uuid[10+$i];
317
+      $field['node'][$i] = $uuid[10 + $i];
318 318
     return ($field);
319 319
   }
320 320
 
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
     $field['clock_seq_hi'] = ($parts[3] & 0xff00) >> 8;
340 340
     $field['clock_seq_low'] = $parts[3] & 0x00ff;
341 341
     for ($i = 0; $i < 6; $i++)
342
-      $field['node'][$i] = $parts[4+$i];
342
+      $field['node'][$i] = $parts[4 + $i];
343 343
 
344 344
     return ($field);
345 345
   }
Please login to merge, or discard this patch.
src/EoC/Info/DbInfo.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,8 +100,8 @@
 block discarded – undo
100 100
       $buffer .= "File Opened Since: ".sprintf($since, $time['days'], $time['hours'], $time['minutes'], $time['seconds']).PHP_EOL;
101 101
     }
102 102
 
103
-    $buffer .= "Disk Size: ".round($this->diskSize/(1024*1024*1024), 3)." GB".PHP_EOL;
104
-    $buffer .= "Data Size: ".round($this->dataSize/(1024*1024*1024), 3)." GB".PHP_EOL;
103
+    $buffer .= "Disk Size: ".round($this->diskSize / (1024 * 1024 * 1024), 3)." GB".PHP_EOL;
104
+    $buffer .= "Data Size: ".round($this->dataSize / (1024 * 1024 * 1024), 3)." GB".PHP_EOL;
105 105
     $buffer .= "Disk Format Version: ".$this->diskFormatVersion.PHP_EOL;
106 106
 
107 107
     $compactRunning = ($this->compactRunning) ? 'active' : 'inactive';
Please login to merge, or discard this patch.
src/EoC/Couch.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
   //!@{
36 36
 
37 37
   const STD_DOC_PATH = ""; //!< Path for standard documents.
38
-  const LOCAL_DOC_PATH = "_local/";  //!< Path for local documents.
39
-  const DESIGN_DOC_PATH = "_design/";  //!< Path for design documents.
38
+  const LOCAL_DOC_PATH = "_local/"; //!< Path for local documents.
39
+  const DESIGN_DOC_PATH = "_design/"; //!< Path for design documents.
40 40
 
41 41
   //!@}
42 42
 
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
    * @see http://docs.couchdb.org/en/latest/api/database/compact.html#db-view-cleanup
663 663
    */
664 664
   public function cleanupViews($dbName) {
665
-    $request =  new Request(Request::POST_METHOD, "/".rawurlencode($this->prefix.$dbName)."/_view_cleanup");
665
+    $request = new Request(Request::POST_METHOD, "/".rawurlencode($this->prefix.$dbName)."/_view_cleanup");
666 666
 
667 667
     // A POST method requires Content-Type header.
668 668
     $request->setHeaderField(Request::CONTENT_TYPE_HF, "application/json");
Please login to merge, or discard this patch.
Doc Comments   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 
297 297
   /**
298 298
    * @brief Returns a list of all database events in the CouchDB instance.
299
-   * @param DbUpdatesFeedOpts $opts Additional options.
299
+   * @param Opt\DbUpdatesFeedOpts $opts Additional options.
300 300
    * @return array An associative array.
301 301
    * @attention Requires admin privileges.
302 302
    * @see http://docs.couchdb.org/en/latest/api/server/common.html#db-updates
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
   /**
565 565
    * @brief Returns information about the selected database.
566 566
    * @param string $name The database name.
567
-   * @return array An associative array.
567
+   * @return Info\DbInfo An associative array.
568 568
    * @see http://docs.couchdb.org/en/latest/api/database/common.html#get--db
569 569
    */
570 570
   public function getDbInfo($name) {
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
    * @brief Obtains a list of the changes made to the database. This can be used to monitor for update and modifications
577 577
    * to the database for post processing or synchronization.
578 578
    * @param string $name The database name.
579
-   * @param ChangesFeedOpts $opts Additional options.
579
+   * @param Opt\ChangesFeedOpts $opts Additional options.
580 580
    * @return Response
581 581
    * @see http://docs.couchdb.org/en/latest/api/database/changes.html
582 582
    */
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
   /**
708 708
    * @brief Returns the special security object for the database.
709 709
    * @param string $dbName The database name.
710
-   * @return string A JSON object.
710
+   * @return Response A JSON object.
711 711
    * @see http://docs.couchdb.org/en/latest/api/database/security.html#get--db-_security
712 712
    */
713 713
   public function getSecurityObj($dbName) {
@@ -761,7 +761,7 @@  discard block
 block discarded – undo
761 761
    * permanent continuous replications that survive a server restart without you having to do anything.
762 762
    * @param string|array $filter (optional) Name of a filter function that can choose which revisions get replicated.
763 763
    * You can also provide an array of document identifiers; if given, only these documents will be replicated.
764
-   * @param ViewQueryOpts $opts (optional) Query options to get additional information, grouping results, include
764
+   * @param Opt\ViewQueryOpts $opts (optional) Query options to get additional information, grouping results, include
765 765
    * docs, etc.
766 766
    * @return Response
767 767
    * @see http://docs.couchdb.org/en/latest/api/server/common.html#post--_replicate
@@ -865,7 +865,7 @@  discard block
 block discarded – undo
865 865
    * @param array $keys (optional) Used to retrieve just the view rows matching that set of keys. Rows are returned
866 866
    * in the order of the specified keys. Combining this feature with Opt\ViewQueryOpts.includeDocs() results in the so-called
867 867
    * multi-document-fetch feature.
868
-   * @param ViewQueryOpts $opts (optional) Query options to get additional information, grouping results, include
868
+   * @param Opt\ViewQueryOpts $opts (optional) Query options to get additional information, grouping results, include
869 869
    * docs, etc.
870 870
    * @param IChunkHook $chunkHook (optional) A class instance that implements the IChunkHook interface.
871 871
    * @return Result\QueryResult The result of the query.
@@ -897,7 +897,7 @@  discard block
 block discarded – undo
897 897
    * @param array $keys (optional) Used to retrieve just the view rows matching that set of keys. Rows are returned
898 898
    * in the order of the specified keys. Combining this feature with Opt\ViewQueryOpts.includeDocs() results in the so-called
899 899
    * multi-document-fetch feature.
900
-   * @param ViewQueryOpts $opts (optional) Query options to get additional information, grouping results, include
900
+   * @param Opt\ViewQueryOpts $opts (optional) Query options to get additional information, grouping results, include
901 901
    * docs, etc.
902 902
    * @param IChunkHook $chunkHook (optional) A class instance that implements the IChunkHook interface.
903 903
    * @return Result\QueryResult The result of the query.
@@ -949,7 +949,7 @@  discard block
 block discarded – undo
949 949
    * @param array $keys (optional) Used to retrieve just the view rows matching that set of keys. Rows are returned
950 950
    * in the order of the specified keys. Combining this feature with Opt\ViewQueryOpts.includeDocs() results in the so-called
951 951
    * multi-document-fetch feature.
952
-   * @param ViewQueryOpts $opts (optional) Query options to get additional information, grouping results, include
952
+   * @param Opt\ViewQueryOpts $opts (optional) Query options to get additional information, grouping results, include
953 953
    * docs, etc.
954 954
    * @param string $language The language used to implement the map and reduce functions.
955 955
    * @param IChunkHook $chunkHook (optional) A class instance that implements the IChunkHook interface.
@@ -1089,7 +1089,7 @@  discard block
 block discarded – undo
1089 1089
    * @param string $docId The document's identifier.
1090 1090
    * @param string $path The document's path.
1091 1091
    * @param string $rev (optional) The document's revision.
1092
-   * @param DocOpts $opts Query options to get additional document information, like conflicts, attachments, etc.
1092
+   * @param Opt\DocOpts $opts Query options to get additional document information, like conflicts, attachments, etc.
1093 1093
    * @return object|Response An instance of Doc, LocalDoc, DesignDoc or any subclass of Doc.
1094 1094
    * @see http://docs.couchdb.org/en/latest/api/document/common.html#get--db-docid
1095 1095
    */
@@ -1144,7 +1144,7 @@  discard block
 block discarded – undo
1144 1144
    * using PUT instead we need to specify one. We can still use the function getUuids() to ask CouchDB for some ids.
1145 1145
    * This is an internal detail. You have only to know that CouchDB can generate the document id for you.
1146 1146
    * @param string $dbName The database name.
1147
-   * @param Doc $doc The document you want insert or update.
1147
+   * @param Doc\IDoc $doc The document you want insert or update.
1148 1148
    * @param bool $batchMode (optional) You can write documents to the database at a higher rate by using the batch
1149 1149
    * option. This collects document writes together in memory (on a user-by-user basis) before they are committed to
1150 1150
    * disk. This increases the risk of the documents not being stored in the event of a failure, since the documents are
@@ -1333,7 +1333,7 @@  discard block
 block discarded – undo
1333 1333
    * @param string $docId The document's identifier.
1334 1334
    * @param string $path The document's path.
1335 1335
    * @param string $rev (optional) The document's revision.
1336
-   * @return string The document's revision.
1336
+   * @return Response The document's revision.
1337 1337
    * @see http://docs.couchdb.org/en/latest/api/document/attachments.html#db-doc-attachment
1338 1338
    */
1339 1339
   public function getAttachmentInfo($dbName, $fileName, $path, $docId, $rev = NULL) {
Please login to merge, or discard this patch.
src/EoC/Result/QueryResult.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
    * arrays.
55 55
    * @return array An array of rows.
56 56
    */
57
-  public function asArray()  {
57
+  public function asArray() {
58 58
     return $this->result['rows'];
59 59
   }
60 60
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
    * @param integer $offset The offset to retrieve.
106 106
    * @return mixed Can return all value types.
107 107
    */
108
-  public function offsetGet($offset)  {
108
+  public function offsetGet($offset) {
109 109
     return $this->result['rows'][$offset];
110 110
   }
111 111
 
Please login to merge, or discard this patch.