From 2ab84fafdebd5d16bdf2fb11634d27a9cdab4c95 Mon Sep 17 00:00:00 2001 From: Miguel Nogueira Date: Tue, 18 Feb 2020 16:07:48 +0000 Subject: [PATCH] Missing break & default --- test.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test.php b/test.php index 19c908e..759412a 100644 --- a/test.php +++ b/test.php @@ -28,6 +28,11 @@ switch ($humanChoice) case 'scissors': $humanChoiceItem = new Scissors(); + break; + + default: + exit('Invalid choice!'); + } @@ -44,6 +49,10 @@ switch ($computerChoice) case 'scissors': $computerChoiceItem = new Scissors(); + break; + + default: + exit('Internal error: Invalid computer choice.'); }