for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace yentu\database;
class Schema extends DatabaseItem
{
private $name;
private $isReference;
public function __construct($name)
$this->name = $name;
}
#[\Override]
public function init()
if(!$this->getDriver()->doesSchemaExist($this->name)) {
doesSchemaExist()
yentu\ChangeLogger
__call
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
if(!$this->getDriver()->/** @scrutinizer ignore-call */ doesSchemaExist($this->name)) {
$this->getDriver()->addSchema($this->name);
addSchema()
$this->getDriver()->/** @scrutinizer ignore-call */ addSchema($this->name);
public function isReference()
return $this->isReference;
public function setIsReference($isReference)
$this->isReference = $isReference;
public function table($name)
if($this->isReference) {
$table = new Table($name, $this);
} else {
$table = $this->create('table', $name, $this);
create()
yentu\database\Schema
/** @scrutinizer ignore-call */
$table->setIsReference($this->isReference);
return $table;
public function view($name)
return $this->create('view', $name, $this);
public function getName()
return $this->name;
protected function buildDescription() {
return array(
'name' => $this->name
);