Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a1c4ec5

Browse files
authoredSep 19, 2023
Add declare strict_types to seed template (cakephp#2220)
1 parent 61e8a0c commit a1c4ec5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

‎src/Phinx/Console/Command/SeedCreate.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
198198

199199
$namespace = $config instanceof NamespaceAwareInterface ? $config->getSeedNamespaceByPath($path) : null;
200200
$classes = [
201-
'$namespaceDefinition' => $namespace !== null ? ('namespace ' . $namespace . ';') : '',
201+
'$namespaceDefinition' => $namespace !== null ? (PHP_EOL . 'namespace ' . $namespace . ';' . PHP_EOL) : '',
202202
'$namespace' => $namespace,
203203
'$useClassName' => $config->getSeedBaseClassName(false),
204204
'$className' => $className,

‎src/Phinx/Seed/Seed.template.php.dist

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
2-
$namespaceDefinition
32

3+
declare(strict_types=1);
4+
$namespaceDefinition
45
use $useClassName;
56

67
class $className extends $baseClassName

0 commit comments

Comments
 (0)
Failed to load comments.