Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | interface DumperInterface |
||
18 | { |
||
19 | /** |
||
20 | * Constructor. |
||
21 | * |
||
22 | * If username or password are not supported, nulls should be passed. |
||
23 | * |
||
24 | * @param array $dsn |
||
25 | * @param string|null $username |
||
26 | * @param string|null $password |
||
27 | */ |
||
28 | public function __construct(array $dsn, $username, $password); |
||
29 | |||
30 | /** |
||
31 | * Dump database to given file. |
||
32 | * |
||
33 | * Aliases in file name should not be used as they should be resolved earlier. |
||
34 | * |
||
35 | * @param string $file |
||
36 | */ |
||
37 | public function dump($file); |
||
38 | |||
39 | /** |
||
40 | * Restore database from given file. |
||
41 | * |
||
42 | * Aliases in file name should not be used as they should be resolved earlier. |
||
43 | * |
||
44 | * @param string $file |
||
45 | */ |
||
46 | public function restore($file); |
||
47 | } |
||
48 |
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.