for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace yentu\database;
use yentu\database\DatabaseItem;
class View extends DatabaseItem implements Changeable, Initializable
{
private $name;
private $schema;
public $definition;
public function __construct($name, $schema)
$this->name = $name;
$this->schema = $schema;
}
#[\Override]
public function initialize(): void
$this->definition = $this->getChangeLogger()->doesViewExist($this->buildDescription());
doesViewExist()
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
$this->definition = $this->getChangeLogger()->/** @scrutinizer ignore-call */ doesViewExist($this->buildDescription());
if($this->definition === false)
$this->new = true;
public function drop()
$this->getChangeLogger()->dropView($this->buildDescription());
dropView()
$this->getChangeLogger()->/** @scrutinizer ignore-call */ dropView($this->buildDescription());
return $this;
public function definition($definition)
$this->addChange('definition', 'definition', $definition);
if($this->isNew())
$this->getChangeLogger()->addView($this->buildDescription());
addView()
$this->getChangeLogger()->/** @scrutinizer ignore-call */ addView($this->buildDescription());
public function view($name)
DatabaseItem::purge();
purge()
yentu\database\DatabaseItem
DatabaseItem::/** @scrutinizer ignore-call */
purge();
return $this->create('view', $name, $this->schema);
create()
yentu\database\View
return $this->/** @scrutinizer ignore-call */ create('view', $name, $this->schema);
public function table($name)
return $this->create('table', $name, $this->schema);
public function buildDescription() {
return array(
'name' => $this->name,
'schema' => $this->schema->getName(),
'definition' => $this->definition
);