Skip to content

Commit 1496d43

Browse files
committed
refactor: use $this->regex
1 parent e655969 commit 1496d43

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

system/Database/MigrationRunner.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,9 +532,9 @@ public function setSilent(bool $silent)
532532
*/
533533
protected function getMigrationNumber(string $migration): string
534534
{
535-
preg_match('/^\d{4}[_-]?\d{2}[_-]?\d{2}[_-]?\d{6}/', $migration, $matches);
535+
preg_match($this->regex, $migration, $matches);
536536

537-
return count($matches) ? $matches[0] : '0';
537+
return count($matches) ? $matches[1] : '0';
538538
}
539539

540540
/**

0 commit comments

Comments
 (0)