DumperInterface::restore()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 1
1
<?php
2
/**
3
 * Yii2 Dumpling.
4
 *
5
 * This file contains dumper interface.
6
 *
7
 * @author  Alexei Korotin <[email protected]>
8
 */
9
10
namespace herroffizier\yii2dumpling\dumpers;
11
12
/**
13
 * Dumper interface.
14
 *
15
 * All dumpers must implement this interface.
16
 */
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);
0 ignored issues
show
Documentation introduced by
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...
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);
0 ignored issues
show
Documentation introduced by
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...
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);
0 ignored issues
show
Documentation introduced by
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...
47
}
48