Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
18 | 39 | public function connect(array $config) |
|
19 | { |
||
20 | 39 | if ($this->fireEvent(new DatabaseConnecting($this, array_get($config, 'name'), $config), true) === false) { |
|
21 | 4 | throw new ConnectingException(); |
|
22 | } |
||
23 | |||
24 | 35 | $connection = $this->parentConnect($config); |
|
25 | |||
26 | 33 | $this->fireEvent(new DatabaseConnected($this, array_get($config, 'name'), $config, $connection)); |
|
27 | |||
28 | 33 | return $connection; |
|
29 | } |
||
30 | |||
42 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.