@@ -188,6 +188,8 @@ public function getMockForTrait(): MockObject
188
188
* Specifies the subset of methods to mock. Default is to mock none of them.
189
189
*
190
190
* @deprecated https://github.com/sebastianbergmann/phpunit/pull/3687
191
+ *
192
+ * @return $this
191
193
*/
192
194
public function setMethods (?array $ methods = null ): self
193
195
{
@@ -206,6 +208,8 @@ public function setMethods(?array $methods = null): self
206
208
* @param string[] $methods
207
209
*
208
210
* @throws RuntimeException
211
+ *
212
+ * @return $this
209
213
*/
210
214
public function onlyMethods (array $ methods ): self
211
215
{
@@ -250,6 +254,8 @@ public function onlyMethods(array $methods): self
250
254
* @param string[] $methods
251
255
*
252
256
* @throws RuntimeException
257
+ *
258
+ * @return $this
253
259
*/
254
260
public function addMethods (array $ methods ): self
255
261
{
@@ -303,6 +309,8 @@ public function setMethodsExcept(array $methods = []): self
303
309
304
310
/**
305
311
* Specifies the arguments for the constructor.
312
+ *
313
+ * @return $this
306
314
*/
307
315
public function setConstructorArgs (array $ args ): self
308
316
{
@@ -313,6 +321,8 @@ public function setConstructorArgs(array $args): self
313
321
314
322
/**
315
323
* Specifies the name for the mock class.
324
+ *
325
+ * @return $this
316
326
*/
317
327
public function setMockClassName (string $ name ): self
318
328
{
@@ -323,6 +333,8 @@ public function setMockClassName(string $name): self
323
333
324
334
/**
325
335
* Disables the invocation of the original constructor.
336
+ *
337
+ * @return $this
326
338
*/
327
339
public function disableOriginalConstructor (): self
328
340
{
@@ -333,6 +345,8 @@ public function disableOriginalConstructor(): self
333
345
334
346
/**
335
347
* Enables the invocation of the original constructor.
348
+ *
349
+ * @return $this
336
350
*/
337
351
public function enableOriginalConstructor (): self
338
352
{
@@ -343,6 +357,8 @@ public function enableOriginalConstructor(): self
343
357
344
358
/**
345
359
* Disables the invocation of the original clone constructor.
360
+ *
361
+ * @return $this
346
362
*/
347
363
public function disableOriginalClone (): self
348
364
{
@@ -353,6 +369,8 @@ public function disableOriginalClone(): self
353
369
354
370
/**
355
371
* Enables the invocation of the original clone constructor.
372
+ *
373
+ * @return $this
356
374
*/
357
375
public function enableOriginalClone (): self
358
376
{
@@ -363,6 +381,8 @@ public function enableOriginalClone(): self
363
381
364
382
/**
365
383
* Disables the use of class autoloading while creating the mock object.
384
+ *
385
+ * @return $this
366
386
*/
367
387
public function disableAutoload (): self
368
388
{
@@ -373,6 +393,8 @@ public function disableAutoload(): self
373
393
374
394
/**
375
395
* Enables the use of class autoloading while creating the mock object.
396
+ *
397
+ * @return $this
376
398
*/
377
399
public function enableAutoload (): self
378
400
{
@@ -383,6 +405,8 @@ public function enableAutoload(): self
383
405
384
406
/**
385
407
* Disables the cloning of arguments passed to mocked methods.
408
+ *
409
+ * @return $this
386
410
*/
387
411
public function disableArgumentCloning (): self
388
412
{
@@ -393,6 +417,8 @@ public function disableArgumentCloning(): self
393
417
394
418
/**
395
419
* Enables the cloning of arguments passed to mocked methods.
420
+ *
421
+ * @return $this
396
422
*/
397
423
public function enableArgumentCloning (): self
398
424
{
@@ -403,6 +429,8 @@ public function enableArgumentCloning(): self
403
429
404
430
/**
405
431
* Enables the invocation of the original methods.
432
+ *
433
+ * @return $this
406
434
*/
407
435
public function enableProxyingToOriginalMethods (): self
408
436
{
@@ -413,6 +441,8 @@ public function enableProxyingToOriginalMethods(): self
413
441
414
442
/**
415
443
* Disables the invocation of the original methods.
444
+ *
445
+ * @return $this
416
446
*/
417
447
public function disableProxyingToOriginalMethods (): self
418
448
{
@@ -424,6 +454,8 @@ public function disableProxyingToOriginalMethods(): self
424
454
425
455
/**
426
456
* Sets the proxy target.
457
+ *
458
+ * @return $this
427
459
*/
428
460
public function setProxyTarget (object $ object ): self
429
461
{
@@ -432,27 +464,39 @@ public function setProxyTarget(object $object): self
432
464
return $ this ;
433
465
}
434
466
467
+ /**
468
+ * @return $this
469
+ */
435
470
public function allowMockingUnknownTypes (): self
436
471
{
437
472
$ this ->allowMockingUnknownTypes = true ;
438
473
439
474
return $ this ;
440
475
}
441
476
477
+ /**
478
+ * @return $this
479
+ */
442
480
public function disallowMockingUnknownTypes (): self
443
481
{
444
482
$ this ->allowMockingUnknownTypes = false ;
445
483
446
484
return $ this ;
447
485
}
448
486
487
+ /**
488
+ * @return $this
489
+ */
449
490
public function enableAutoReturnValueGeneration (): self
450
491
{
451
492
$ this ->returnValueGeneration = true ;
452
493
453
494
return $ this ;
454
495
}
455
496
497
+ /**
498
+ * @return $this
499
+ */
456
500
public function disableAutoReturnValueGeneration (): self
457
501
{
458
502
$ this ->returnValueGeneration = false ;
0 commit comments