GreetingGenerator.php 211 B

123456789101112
  1. <?php
  2. namespace App;
  3. class GreetingGenerator {
  4. public function getRandomGreeting() {
  5. $greetings = ['Hey', 'Yo', 'Aloha'];
  6. $greeting = $greetings[array_rand($greetings)];
  7. return $greeting;
  8. }
  9. }