1 | <?php |
||
32 | trait HasWriteOnlyProperties |
||
33 | { |
||
34 | /** |
||
35 | * @returns IStrictPropertiesContainer |
||
36 | */ |
||
37 | public abstract function testImplementsIStrictPropertiesContainerInterface($obj); |
||
38 | |||
39 | public abstract function writeonlyPropertiesProvider(); |
||
40 | |||
41 | /** |
||
42 | * @dataProvider writeonlyPropertiesProvider |
||
43 | */ |
||
44 | public function testWriteonlyPropertiesAreWritables( |
||
51 | |||
52 | /** |
||
53 | * @depends testWriteonlyPropertiesAreWritables |
||
54 | * @dataProvider writeonlyPropertiesProvider |
||
55 | * @expectedException \BadMethodCallException |
||
56 | */ |
||
57 | public function testWriteonlyPropertiesAreNotReadables( |
||
65 | } |
||
66 |
For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a
@return
doc comment to communicate to implementors of these methods what they are expected to return.