Skip to content
Snippets Groups Projects
Unverified Commit 68acee7a authored by Thomas Flori's avatar Thomas Flori
Browse files

return full path from create migration interface

parent f3461203
No related branches found
No related tags found
No related merge requests found
......@@ -73,11 +73,11 @@ class CallbackProgress implements ProgressInterface
/**
* Output information about the $statement (before it gets executed)
*
* @param Statement $execution
* @param Statement $statement
*/
public function beforeExecution(Statement $execution)
public function beforeExecution(Statement $statement)
{
!$this->beforeExecutionCallback || call_user_func($this->beforeExecutionCallback, $execution);
!$this->beforeExecutionCallback || call_user_func($this->beforeExecutionCallback, $statement);
}
public function onBeforeExecution(callable $callback): self
......@@ -89,11 +89,11 @@ class CallbackProgress implements ProgressInterface
/**
* Output information about the $statement (after it gets executed)
*
* @param Statement $execution
* @param Statement $statement
*/
public function afterExecution(Statement $execution)
public function afterExecution(Statement $statement)
{
!$this->afterExecutionCallback || call_user_func($this->afterExecutionCallback, $execution);
!$this->afterExecutionCallback || call_user_func($this->afterExecutionCallback, $statement);
}
public function onAfterExecution(callable $callback): self
......
......@@ -315,10 +315,12 @@ class Migrations
*
* We recommend StudlyCase naming for PSR2 compatibility. Also the files will get a namespace.
*
* Returns the path to the generated migration.
*
* @param string $name
* @return bool
* @return string
*/
public function createMigration(string $name): bool
public function createMigration(string $name): string
{
static $template;
if (is_null($template)) {
......@@ -341,7 +343,7 @@ class Migrations
'CLASS_NAME' => $className,
'FILE_NAME' => $fileName,
]));
return true;
return $fullPath;
}
/** @codeCoverageIgnore */
......
......@@ -28,15 +28,15 @@ interface ProgressInterface
/**
* Output information about the $statement (before it gets executed)
* @param Statement $execution
* @param Statement $statement
*/
public function beforeExecution(Statement $execution);
public function beforeExecution(Statement $statement);
/**
* Output information about the $statement (after it gets executed)
* @param Statement $execution
* @param Statement $statement
*/
public function afterExecution(Statement $execution);
public function afterExecution(Statement $statement);
/**
* Output information about the $migration (after the migration)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment