for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace CodexShaper\WP\Database;
use Illuminate\Database\Capsule\Manager as Capsule;
class DB extends Capsule
{
protected static $instance = false;
public static function instance()
if (!static::$instance) {
static::$instance = new self();
new self()
object<CodexShaper\WP\Database\DB>
boolean
$instance
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..
}
return static::$instance;
public function __construct()
parent::__construct();
global $wpdb;
$this->addConnection([
'driver' => 'mysql',
'host' => $wpdb->dbhost,
'database' => $wpdb->dbname,
'username' => $wpdb->dbuser,
'password' => $wpdb->dbpassword,
'prefix' => $wpdb->prefix,
'charset' => $wpdb->charset,
'collation' => $wpdb->collate,
]);
//Make this Capsule instance available globally.
$this->setAsGlobal();
// Setup the Eloquent ORM.
$this->bootEloquent();
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..