for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Migratio;
use Migratio\Resource\SqlDefinitor;
use Migratio\Contract\SchemaContract;
use Migratio\Resource\PullManager\Pulling;
use Migratio\Resource\PushManager\Pushing;
use Migratio\Resource\StubManager\Stubber;
class Schema extends SchemaHelper implements SchemaContract
{
/**
* @var array $params
*/
public $params = array();
* @var $config
$config
0
protected $config;
* @var $connection
$connection
protected $connection;
* @var $driver
$driver
protected $driver;
* @var $grammarPath
$grammarPath
protected $grammarPath = 'Migratio\GrammarStructure';
* Schema constructor.
* @param null $config
null
public function __construct($config=null)
$this->config = $config;
$this->driver = $this->config['database']['driver'];
$this->grammarPath = $this->grammarPath.'\\'.ucfirst($this->driver);
$this->connection = (new SqlDefinitor($this->config))->getConnection();
}
* @return Pulling|mixed
public function pull()
$pulling = new Pulling($this);
return $pulling->get();
$pulling->get()
Migratio\Resource\PullManager\Pulling::get()
This check looks for function or method calls that always return null and whose return value is used.
class A { function getObject() { return null; } } $a = new A(); if ($a->getObject()) {
The method getObject() can return nothing but null, so it makes no sense to use the return value.
getObject()
The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.
* @return Pushing|mixed
public function push()
$pushing = new Pushing($this);
return $pushing->handle();
$pushing->handle()
Migratio\Resource\PushManager\Pushing::handle()
* @return mixed|void
public function stub(...$params)
$stubber = new Stubber($this);
return $stubber->get($params[0]);