Skip to content

Commit 6a56e50

Browse 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 b6eb1f4979db346ffe9fe7f6a5f335323f0c7175
1 parent c9ed8d1 commit 6a56e50

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Command/TranslationDebugCommand.php

Lines 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
}

Command/TranslationUpdateCommand.php

Lines 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)