Skip to content

Commit

Permalink
Improve method definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
ilijastuden committed Dec 21, 2019
1 parent 9c4824b commit 76863e4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
15 changes: 10 additions & 5 deletions src/Migrations.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ public function __construct(ConnectionInterface &$connection, FinderInterface &$
$this->table_name = $table_name;
}

/**
* {@inheritdoc}
*/
public function getFinder()
public function getFinder(): FinderInterface
{
return $this->finder;
}
Expand Down Expand Up @@ -258,7 +255,15 @@ public function setAllAsExecuted()
$this->connection->transact(function () {
$timestamp = new DateTimeValue();

$batch = $this->connection->batchInsert($this->getTableName(), ['migration', 'executed_at'], 50, ConnectionInterface::REPLACE);
$batch = $this->connection->batchInsert(
$this->getTableName(),
[
'migration',
'executed_at',
],
50,
ConnectionInterface::REPLACE
);

foreach ($this->getMigrations() as $migration) {
$batch->insert(get_class($migration), $timestamp);
Expand Down
5 changes: 1 addition & 4 deletions src/MigrationsInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
*/
interface MigrationsInterface
{
/**
* @return FinderInterface
*/
public function getFinder();
public function getFinder(): FinderInterface;

/**
* Find and return all migrations (using Finder object).
Expand Down

0 comments on commit 76863e4

Please sign in to comment.