Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 22db5ad

Browse filesBrowse files
committed
[FrameworkBundle] remove dead conditions in Translation Commands
Since $targetPath is directly set just 3 lines above !isset($targetPath[1]) will *always* evaluate to true. This check was originally to support legacy paths which was removed in b6eb1f4
1 parent ff174c6 commit 22db5ad
Copy full SHA for 22db5ad

File tree

Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
165165
$transPaths = [$path.'/translations'];
166166
$codePaths = [$path.'/templates'];
167167

168-
if (!is_dir($transPaths[0]) && !isset($transPaths[1])) {
168+
if (!is_dir($transPaths[0])) {
169169
throw new InvalidArgumentException(sprintf('"%s" is neither an enabled bundle nor a directory.', $transPaths[0]));
170170
}
171171
}

‎src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
197197
$transPaths = [$path.'/translations'];
198198
$codePaths = [$path.'/templates'];
199199

200-
if (!is_dir($transPaths[0]) && !isset($transPaths[1])) {
200+
if (!is_dir($transPaths[0])) {
201201
throw new InvalidArgumentException(sprintf('"%s" is neither an enabled bundle nor a directory.', $transPaths[0]));
202202
}
203203
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.