Conditions | 1 |
Paths | 1 |
Total Lines | 24 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
20 | public function __construct() |
||
21 | { |
||
22 | parent::__construct(); |
||
23 | |||
24 | global $wpdb; |
||
25 | |||
26 | $this->addConnection([ |
||
27 | |||
28 | 'driver' => 'mysql', |
||
29 | 'host' => $wpdb->dbhost, |
||
30 | 'database' => $wpdb->dbname, |
||
31 | 'username' => $wpdb->dbuser, |
||
32 | 'password' => $wpdb->dbpassword, |
||
33 | 'prefix' => $wpdb->prefix, |
||
34 | 'charset' => $wpdb->charset, |
||
35 | 'collation' => $wpdb->collate, |
||
36 | ]); |
||
37 | |||
38 | //Make this Capsule instance available globally. |
||
39 | $this->setAsGlobal(); |
||
40 | |||
41 | // Setup the Eloquent ORM. |
||
42 | $this->bootEloquent(); |
||
43 | } |
||
44 | } |
||
45 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..