1 | <?php |
||
8 | class DbCredentials implements RegistrationInterface |
||
9 | { |
||
10 | /** @var array */ |
||
11 | private $credentials = [ |
||
12 | 'driver' => 'pdo_mysql', |
||
13 | 'host' => '127.0.0.1', |
||
14 | 'dbname' => '', |
||
15 | 'user' => '', |
||
16 | 'password' => '', |
||
17 | ]; |
||
18 | |||
19 | 11 | public function __construct(array $array = []) |
|
23 | |||
24 | /** |
||
25 | * @return string |
||
26 | */ |
||
27 | 1 | public function getPassword(): string |
|
31 | |||
32 | /** |
||
33 | * @param string $password |
||
34 | */ |
||
35 | 11 | public function setPassword(string $password) |
|
39 | |||
40 | /** |
||
41 | * @return string |
||
42 | */ |
||
43 | 1 | public function getUser(): string |
|
47 | |||
48 | /** |
||
49 | * @param string $user |
||
50 | * @return DbCredentials |
||
51 | */ |
||
52 | 12 | public function setUser(string $user) |
|
56 | |||
57 | /** |
||
58 | * @return string |
||
59 | */ |
||
60 | 1 | public function getDatabase(): string |
|
64 | |||
65 | /** |
||
66 | * @param string $database |
||
67 | */ |
||
68 | 11 | public function setDatabase(string $database) |
|
72 | |||
73 | /** |
||
74 | * @return string |
||
75 | */ |
||
76 | 1 | public function getHost(): string |
|
80 | |||
81 | /** |
||
82 | * @param string $database |
||
|
|||
83 | */ |
||
84 | 10 | public function setHost(string $host) |
|
88 | |||
89 | /** |
||
90 | * @return string |
||
91 | */ |
||
92 | 1 | public function getDriver(): string |
|
96 | |||
97 | /** |
||
98 | * @param string $driver |
||
99 | */ |
||
100 | 11 | public function setDriver(string $driver) |
|
104 | |||
105 | /** |
||
106 | * @return array |
||
107 | */ |
||
108 | 9 | public function toArray(): array |
|
112 | |||
113 | /** |
||
114 | * @param Container $c |
||
115 | * @return Container |
||
116 | */ |
||
117 | 1 | public function addToContainer(Container $c): Container |
|
122 | |||
123 | /** |
||
124 | * @return string |
||
125 | */ |
||
126 | 1 | public function getEntityPath(): string |
|
130 | |||
131 | /** |
||
132 | * @return bool |
||
133 | */ |
||
134 | 1 | public function hasEntityPath(): bool |
|
138 | } |
||
139 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.