| 1 | <?php |
||
| 13 | trait PortToMock |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @return PHPUnit_Framework_MockObject_MockObject |
||
| 17 | */ |
||
| 18 | abstract public function getMock(): PHPUnit_Framework_MockObject_MockObject; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * {@inheritdoc} |
||
| 22 | */ |
||
| 23 | public function expects(Invocation $matcher) |
||
| 27 | |||
| 28 | /** |
||
| 29 | * {@inheritdoc} |
||
| 30 | */ |
||
| 31 | public function __phpunit_setOriginalObject($originalObject) |
||
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | public function __phpunit_getInvocationMocker() |
||
| 45 | |||
| 46 | /** |
||
| 47 | * {@inheritdoc} |
||
| 48 | */ |
||
| 49 | public function __phpunit_verify($unsetInvocationMocker = true) |
||
| 53 | |||
| 54 | /** |
||
| 55 | * {@inheritdoc} |
||
| 56 | */ |
||
| 57 | public function __phpunit_hasMatchers() |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @param bool $returnValueGeneration |
||
| 64 | * @return mixed |
||
| 65 | */ |
||
| 66 | public function __phpunit_setReturnValueGeneration(bool $returnValueGeneration) |
||
| 70 | } |
||
| 71 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: