File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ public function dump(
57
57
string $ fqcn ,
58
58
array $ excludedTablesRegexes = [],
59
59
bool $ formatted = false ,
60
- bool $ nowdocOutput = false ,
60
+ bool | null $ nowdocOutput = null ,
61
61
int $ lineLength = 120 ,
62
62
): string {
63
63
$ schema = $ this ->schemaManager ->introspectSchema ();
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ protected function configure(): void
67
67
'nowdoc ' ,
68
68
null ,
69
69
InputOption::VALUE_NEGATABLE ,
70
- 'Output the generated SQL as a nowdoc string (always active for formatted queries). ' ,
70
+ 'Output the generated SQL as a nowdoc string (enabled by default for formatted queries). ' ,
71
71
)
72
72
->addOption (
73
73
'line-length ' ,
@@ -108,7 +108,8 @@ protected function execute(
108
108
}
109
109
110
110
$ formatted = filter_var ($ input ->getOption ('formatted ' ), FILTER_VALIDATE_BOOLEAN );
111
- $ nowdocOutput = filter_var ($ input ->getOption ('nowdoc ' ), FILTER_VALIDATE_BOOLEAN );
111
+ $ nowdocOutput = $ input ->getOption ('nowdoc ' );
112
+ $ nowdocOutput = $ nowdocOutput === null ? null : filter_var ($ input ->getOption ('nowdoc ' ), FILTER_VALIDATE_BOOLEAN );
112
113
$ lineLength = (int ) $ input ->getOption ('line-length ' );
113
114
$ allowEmptyDiff = $ input ->getOption ('allow-empty-diff ' );
114
115
$ checkDbPlatform = filter_var ($ input ->getOption ('check-database-platform ' ), FILTER_VALIDATE_BOOLEAN );
Original file line number Diff line number Diff line change @@ -55,8 +55,8 @@ protected function configure(): void
55
55
->addOption (
56
56
'nowdoc ' ,
57
57
null ,
58
- InputOption::VALUE_NONE ,
59
- 'Output the generated SQL as a nowdoc string (always active for formatted queries). ' ,
58
+ InputOption::VALUE_NEGATABLE ,
59
+ 'Output the generated SQL as a nowdoc string (enabled by default for formatted queries). ' ,
60
60
)
61
61
->addOption (
62
62
'namespace ' ,
@@ -85,7 +85,8 @@ public function execute(
85
85
OutputInterface $ output ,
86
86
): int {
87
87
$ formatted = filter_var ($ input ->getOption ('formatted ' ), FILTER_VALIDATE_BOOLEAN );
88
- $ nowdocOutput = filter_var ($ input ->getOption ('nowdoc ' ), FILTER_VALIDATE_BOOLEAN );
88
+ $ nowdocOutput = $ input ->getOption ('nowdoc ' );
89
+ $ nowdocOutput = $ nowdocOutput === null ? null : filter_var ($ input ->getOption ('nowdoc ' ), FILTER_VALIDATE_BOOLEAN );
89
90
$ lineLength = (int ) $ input ->getOption ('line-length ' );
90
91
91
92
$ schemaDumper = $ this ->getDependencyFactory ()->getSchemaDumper ();
You can’t perform that action at this time.
0 commit comments