Skip to content

Commit

Permalink
minor #5381 remove Yoda condition (greg0ire)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
wouterj committed Jun 27, 2015
2 parents 4f3ce84 + 9dcac5a commit 1b00161
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/console/introduction.rst
Expand Up @@ -198,7 +198,7 @@ level of verbosity.
It is possible to print a message in a command for only a specific verbosity
level. For example::

if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
if ($output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
$output->writeln(...);
}

Expand Down

0 comments on commit 1b00161

Please sign in to comment.