for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Scrawler\Arca\Facade;
use Scrawler\Arca\Manager\TableManager;
use Scrawler\Arca\Manager\RecordManager;
use Scrawler\Arca\Manager\ModelManager;
use Scrawler\Arca\Database as DB;
class Database {
private static $database;
public static function connect(array $connectionParams){
if(self::$database == null)
{
$connection = \Doctrine\DBAL\DriverManager::getConnection($connectionParams);
self::$database = new DB($connection);
self::$database->setManagers(new TableManager(self::$database),new RecordManager(self::$database),new ModelManager(self::$database));
return self::$database;
}
private static function getDB(){
getDB()
This check looks for private methods that have been defined, but are not used inside the class.
public static function create($name){
return getDB()->create($name);
getDB
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
return /** @scrutinizer ignore-call */ getDB()->create($name);
This check looks for private methods that have been defined, but are not used inside the class.