for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* MySQL connector class.
* @package sapphire
* @subpackage model
*/
class MySQLANSIDatabase extends MySQLDatabase
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
* Connection to the DBMS.
* @var resource
private $dbConn;
$dbConn
This check marks private properties in classes that are never used. Those properties can be removed.
* True if we are connected to a database.
* @var boolean
private $active;
$active
* The name of the database.
* @var string
private $database;
$database
* Connect to a MySQL database.
* @param array $parameters An map of parameters, which should include:
* - server: The server, eg, localhost
* - username: The username to log on with
* - password: The password to log on with
* - database: The database to connect to
public function __construct($parameters)
parent::__construct($parameters);
$this->query("SET sql_mode = 'ANSI'");
}
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.