For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.
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.
Loading history...
16
17
/**
18
* set controller namespace
19
*
20
* @param string $ctrlNamespace
21
* @return KernelInterface
22
*/
23
public function setNameSpace(string $ctrlNamespace): KernelInterface;
24
25
/**
26
* retrieve kernel instance classname from container
27
*
28
* @return string
29
*/
30
public function getBundleClassname(): string;
31
32
/**
33
* run app
34
*
35
* @param array $groups
36
* @return KernelInterface
37
*/
38
public function run(array $groups = []): KernelInterface;
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.