Skip to content

Commit 6b4adfd

Browse files
committed
Merge pull request doctrine#1370 from Bilge/fluent-interface
Corrected fluent interface docblock annotations.
2 parents 9d92df5 + fda9592 commit 6b4adfd

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed

lib/Doctrine/ODM/MongoDB/Cursor.php

+16-16
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public function getQuery()
192192
* @see http://php.net/manual/en/mongocursor.addoption.php
193193
* @param string $key
194194
* @param mixed $value
195-
* @return self
195+
* @return $this
196196
*/
197197
public function addOption($key, $value)
198198
{
@@ -206,7 +206,7 @@ public function addOption($key, $value)
206206
* @see CursorInterface::batchSize()
207207
* @see http://php.net/manual/en/mongocursor.batchsize.php
208208
* @param integer $num
209-
* @return self
209+
* @return $this
210210
*/
211211
public function batchSize($num)
212212
{
@@ -276,7 +276,7 @@ public function explain()
276276
*
277277
* @see CursorInterface::fields()
278278
* @see http://php.net/manual/en/mongocursor.fields.php
279-
* @return self
279+
* @return $this
280280
*/
281281
public function fields(array $f)
282282
{
@@ -319,7 +319,7 @@ public function getReadPreference()
319319
* @see http://php.net/manual/en/mongocursor.setreadpreference.php
320320
* @param string $readPreference
321321
* @param array $tags
322-
* @return self
322+
* @return $this
323323
*/
324324
public function setReadPreference($readPreference, array $tags = null)
325325
{
@@ -381,7 +381,7 @@ public function hasNext()
381381
* @see CursorInterface::hint()
382382
* @see http://php.net/manual/en/mongocursor.hint.php
383383
* @param array|string $keyPattern
384-
* @return self
384+
* @return $this
385385
*/
386386
public function hint($keyPattern)
387387
{
@@ -393,7 +393,7 @@ public function hint($keyPattern)
393393
* Set whether to hydrate results as document class instances.
394394
*
395395
* @param boolean $hydrate
396-
* @return self
396+
* @return $this
397397
*/
398398
public function hydrate($hydrate = true)
399399
{
@@ -420,7 +420,7 @@ private function hydrateDocument($document)
420420
* @see CursorInterface::immortal()
421421
* @see http://php.net/manual/en/mongocursor.immortal.php
422422
* @param boolean $liveForever
423-
* @return self
423+
* @return $this
424424
*/
425425
public function immortal($liveForever = true)
426426
{
@@ -459,7 +459,7 @@ public function key()
459459
* @see CursorInterface::limit()
460460
* @see http://php.net/manual/en/mongocursor.limit.php
461461
* @param integer $num
462-
* @return self
462+
* @return $this
463463
*/
464464
public function limit($num)
465465
{
@@ -496,7 +496,7 @@ public function recreate()
496496
* This option has no effect if hydration is disabled.
497497
*
498498
* @param boolean $refresh
499-
* @return self
499+
* @return $this
500500
*/
501501
public function refresh($refresh = true)
502502
{
@@ -534,7 +534,7 @@ public function rewind()
534534
* @see CursorInterface::skip()
535535
* @see http://php.net/manual/en/mongocursor.skip.php
536536
* @param integer $num
537-
* @return self
537+
* @return $this
538538
*/
539539
public function skip($num)
540540
{
@@ -548,7 +548,7 @@ public function skip($num)
548548
* @see CursorInterface::slaveOkay()
549549
* @see http://php.net/manual/en/mongocursor.slaveokay.php
550550
* @param boolean $ok
551-
* @return self
551+
* @return $this
552552
*/
553553
public function slaveOkay($ok = true)
554554
{
@@ -563,7 +563,7 @@ public function slaveOkay($ok = true)
563563
*
564564
* @see CursorInterface::snapshot()
565565
* @see http://php.net/manual/en/mongocursor.snapshot.php
566-
* @return self
566+
* @return $this
567567
*/
568568
public function snapshot()
569569
{
@@ -579,7 +579,7 @@ public function snapshot()
579579
* @see CursorInterface::sort()
580580
* @see http://php.net/manual/en/mongocursor.sort.php
581581
* @param array $fields
582-
* @return self
582+
* @return $this
583583
*/
584584
public function sort($fields)
585585
{
@@ -597,7 +597,7 @@ public function sort($fields)
597597
* @see CursorInterface::tailable()
598598
* @see http://php.net/manual/en/mongocursor.tailable.php
599599
* @param boolean $tail
600-
* @return self
600+
* @return $this
601601
*/
602602
public function tailable($tail = true)
603603
{
@@ -611,7 +611,7 @@ public function tailable($tail = true)
611611
* @see CursorInterface::timeout()
612612
* @see http://php.net/manual/en/mongocursor.timeout.php
613613
* @param integer $ms
614-
* @return self
614+
* @return $this
615615
*/
616616
public function timeout($ms)
617617
{
@@ -664,7 +664,7 @@ public function valid()
664664
/**
665665
* @param array $primers
666666
* @param ReferencePrimer $referencePrimer
667-
* @return self
667+
* @return $this
668668
*/
669669
public function enableReferencePriming(array $primers, ReferencePrimer $referencePrimer)
670670
{

lib/Doctrine/ODM/MongoDB/Query/Builder.php

+14-14
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function __construct(DocumentManager $dm, $documentName = null)
101101
* Set whether or not to require indexes.
102102
*
103103
* @param bool $requireIndexes
104-
* @return Builder
104+
* @return $this
105105
*/
106106
public function requireIndexes($requireIndexes = true)
107107
{
@@ -113,7 +113,7 @@ public function requireIndexes($requireIndexes = true)
113113
* Set the current field to operate on.
114114
*
115115
* @param string $field
116-
* @return self
116+
* @return $this
117117
*/
118118
public function field($field)
119119
{
@@ -138,7 +138,7 @@ public function field($field)
138138
* Closure defined in {@link ReferencePrimer::__construct()}.
139139
*
140140
* @param boolean|callable $primer
141-
* @return Builder
141+
* @return $this
142142
* @throws \InvalidArgumentException If $primer is not boolean or callable
143143
*/
144144
public function prime($primer = true)
@@ -176,7 +176,7 @@ public function eagerCursor($bool = true)
176176

177177
/**
178178
* @param bool $bool
179-
* @return Builder
179+
* @return $this
180180
*/
181181
public function hydrate($bool = true)
182182
{
@@ -186,7 +186,7 @@ public function hydrate($bool = true)
186186

187187
/**
188188
* @param bool $bool
189-
* @return Builder
189+
* @return $this
190190
*/
191191
public function refresh($bool = true)
192192
{
@@ -198,7 +198,7 @@ public function refresh($bool = true)
198198
* Change the query type to find and optionally set and change the class being queried.
199199
*
200200
* @param string $documentName
201-
* @return Builder
201+
* @return $this
202202
*/
203203
public function find($documentName = null)
204204
{
@@ -210,7 +210,7 @@ public function find($documentName = null)
210210

211211
/**
212212
* @param string $documentName
213-
* @return Builder
213+
* @return $this
214214
*/
215215
public function findAndUpdate($documentName = null)
216216
{
@@ -222,7 +222,7 @@ public function findAndUpdate($documentName = null)
222222

223223
/**
224224
* @param bool $bool
225-
* @return self
225+
* @return $this
226226
*/
227227
public function returnNew($bool = true)
228228
{
@@ -234,7 +234,7 @@ public function returnNew($bool = true)
234234

235235
/**
236236
* @param string $documentName
237-
* @return Builder
237+
* @return $this
238238
*/
239239
public function findAndRemove($documentName = null)
240240
{
@@ -246,7 +246,7 @@ public function findAndRemove($documentName = null)
246246

247247
/**
248248
* @param string $documentName
249-
* @return Builder
249+
* @return $this
250250
*/
251251
public function update($documentName = null)
252252
{
@@ -258,7 +258,7 @@ public function update($documentName = null)
258258

259259
/**
260260
* @param string $documentName
261-
* @return Builder
261+
* @return $this
262262
*/
263263
public function insert($documentName = null)
264264
{
@@ -270,7 +270,7 @@ public function insert($documentName = null)
270270

271271
/**
272272
* @param string $documentName
273-
* @return Builder
273+
* @return $this
274274
*/
275275
public function remove($documentName = null)
276276
{
@@ -282,7 +282,7 @@ public function remove($documentName = null)
282282

283283
/**
284284
* @param object $document
285-
* @return Builder
285+
* @return $this
286286
*/
287287
public function references($document)
288288
{
@@ -292,7 +292,7 @@ public function references($document)
292292

293293
/**
294294
* @param object $document
295-
* @return Builder
295+
* @return $this
296296
*/
297297
public function includesReferenceTo($document)
298298
{

0 commit comments

Comments
 (0)