1 | <?php |
||
32 | trait HasUnaccesibleProperties |
||
33 | { |
||
34 | /** |
||
35 | * @returns IStrictPropertiesContainer |
||
36 | */ |
||
37 | public abstract function testImplementsIStrictPropertiesContainerInterface($obj); |
||
38 | |||
39 | public abstract function unaccesiblePropertiesProvider(); |
||
40 | |||
41 | /** |
||
42 | * @dataProvider unaccesiblePropertiesProvider |
||
43 | * @expectedException \BadMethodCallException |
||
44 | */ |
||
45 | public function testUnaccessiblePropertiesThrowsCatchableError( |
||
59 | } |
||
60 |
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.