Skip to content

Commit

Permalink
Add declare strict_types to seed template (#2220)
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterOdin authored Sep 19, 2023
1 parent 61e8a0c commit a1c4ec5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Phinx/Console/Command/SeedCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int

$namespace = $config instanceof NamespaceAwareInterface ? $config->getSeedNamespaceByPath($path) : null;
$classes = [
'$namespaceDefinition' => $namespace !== null ? ('namespace ' . $namespace . ';') : '',
'$namespaceDefinition' => $namespace !== null ? (PHP_EOL . 'namespace ' . $namespace . ';' . PHP_EOL) : '',
'$namespace' => $namespace,
'$useClassName' => $config->getSeedBaseClassName(false),
'$className' => $className,
Expand Down
3 changes: 2 additions & 1 deletion src/Phinx/Seed/Seed.template.php.dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
$namespaceDefinition

declare(strict_types=1);
$namespaceDefinition
use $useClassName;

class $className extends $baseClassName
Expand Down

0 comments on commit a1c4ec5

Please sign in to comment.