1 | <?php |
||
13 | class DatabaseQueryBuilder extends Database implements ConfigureInterface |
||
14 | { |
||
15 | use QueryBuilderTrait, |
||
16 | ConfigureTrait { |
||
17 | configure as protected loadConfiguration; |
||
18 | } |
||
19 | |||
20 | |||
21 | |||
22 | /** |
||
23 | * Constructor creating a PDO object connecting to a choosen database. |
||
24 | * |
||
25 | * @param array $options containing details for connecting to the database. |
||
26 | */ |
||
27 | public function __construct($options = []) |
||
32 | |||
33 | |||
34 | |||
35 | /** |
||
36 | * Load and apply configurations. |
||
37 | * |
||
38 | * @param array|string $what is an array with key/value config options |
||
39 | * or a file to be included which returns such |
||
40 | * an array. |
||
41 | * |
||
42 | * @return self |
||
43 | */ |
||
44 | 1 | public function configure($what) |
|
51 | |||
52 | |||
53 | |||
54 | /** |
||
55 | * Update builder settings from active configuration. |
||
56 | * |
||
57 | * @return void |
||
58 | */ |
||
59 | 1 | private function setDefaultsFromConfiguration() |
|
68 | |||
69 | |||
70 | |||
71 | /** |
||
72 | * Execute a SQL-query and ignore the resultset. |
||
73 | * |
||
74 | * @param string $query the SQL statement |
||
75 | * @param array $params the params array |
||
76 | * |
||
77 | * @return boolean returns TRUE on success or FALSE on failure. |
||
78 | */ |
||
79 | 3 | public function execute($query = null, $params = []) |
|
92 | } |
||
93 |
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.