Skip to content

Commit 1b00161

Browse files
committed
minor #5381 remove Yoda condition (greg0ire)
This PR was merged into the 2.3 branch. Discussion ---------- remove Yoda condition Yoda conditions : a questionable best practice that makes code less error-prone, but also harder to read for people that don't share the same grammar rules as people from Dagobah. Anyway, they are useful when you want to avoid confusing assignment and equality operators, but I doubt people often write `=` while meaning to write `<=`. Commits ------- 9dcac5a remove Yoda condition
2 parents 4f3ce84 + 9dcac5a commit 1b00161

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/console/introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ level of verbosity.
198198
It is possible to print a message in a command for only a specific verbosity
199199
level. For example::
200200

201-
if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
201+
if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
202202
$output->writeln(...);
203203
}
204204

0 commit comments

Comments
 (0)