1 | <?php |
||
14 | class NamedPdoModule extends AbstractModule |
||
15 | { |
||
16 | const PARSE_PDO_DSN_REGEX = '/(.*?)\:(host|server)=.*?;(.*)/i'; |
||
17 | |||
18 | /** |
||
19 | * @var string |
||
20 | */ |
||
21 | private $qualifer; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | private $dsn; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | private $user; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | private $password; |
||
37 | |||
38 | /** |
||
39 | * @var string |
||
40 | */ |
||
41 | private $slave; |
||
42 | |||
43 | 6 | public function __construct( |
|
57 | |||
58 | /** |
||
59 | * {@inheritdoc} |
||
60 | */ |
||
61 | 6 | protected function configure() |
|
66 | |||
67 | 3 | private function configureSingleDsn($qualifer, $dsn, $user, $password) |
|
79 | |||
80 | 3 | private function configureMasterSlaveDsn($qualifer, $dsn, $user, $password, $slaveList) |
|
93 | |||
94 | /** |
||
95 | * @param string $dsn |
||
96 | * @param string $host |
||
97 | * |
||
98 | * @return string |
||
99 | */ |
||
100 | 3 | private function changeHost($dsn, $host) |
|
110 | } |
||
111 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: