From 9dcac5ae3a52ecb2dc23649896bdcefdaafd681b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Thu, 11 Jun 2015 10:49:17 +0200 Subject: [PATCH] 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 `<=`. --- components/console/introduction.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/console/introduction.rst b/components/console/introduction.rst index eda67260924..02ad6d1bc58 100644 --- a/components/console/introduction.rst +++ b/components/console/introduction.rst @@ -196,7 +196,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(...); }