From 3d7aab9148c1b0708d797c3606e94fc60b41e040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me?= Date: Sun, 16 Dec 2018 16:51:33 +0100 Subject: [PATCH 1/2] Update console.rst For logical purpose, I added a `!` right before `$this->requirePassword` in the `configure()` method, otherwise the requirePassword argument would be set as REQUIRED instead of OPTIONAL. --- console.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/console.rst b/console.rst index f0769009bea..31f5a678b86 100644 --- a/console.rst +++ b/console.rst @@ -92,7 +92,7 @@ available in the ``configure()`` method:: { $this // ... - ->addArgument('password', $this->requirePassword ? InputArgument::OPTIONAL : InputArgument::REQUIRED, 'User password') + ->addArgument('password', !$this->requirePassword ? InputArgument::OPTIONAL : InputArgument::REQUIRED, 'User password') ; } } From 10a8754af329a84113265d0786a087db59731322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me?= Date: Mon, 17 Dec 2018 15:14:05 +0100 Subject: [PATCH 2/2] Removed "!", reversed constants instead Removed the "!" and just reversed the constants as suggested by Jannik Zschiesche --- console.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/console.rst b/console.rst index 31f5a678b86..c0aafddec2b 100644 --- a/console.rst +++ b/console.rst @@ -92,7 +92,7 @@ available in the ``configure()`` method:: { $this // ... - ->addArgument('password', !$this->requirePassword ? InputArgument::OPTIONAL : InputArgument::REQUIRED, 'User password') + ->addArgument('password', $this->requirePassword ? InputArgument::REQUIRED : InputArgument::OPTIONAL, 'User password') ; } }