Skip to content

Commit 9dcac5a

Browse files
committed
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 on 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 `<=`.
1 parent 5c0f8fb commit 9dcac5a

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
@@ -196,7 +196,7 @@ level of verbosity.
196196
It is possible to print a message in a command for only a specific verbosity
197197
level. For example::
198198

199-
if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
199+
if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
200200
$output->writeln(...);
201201
}
202202

0 commit comments

Comments
 (0)