Guest User

Untitled

a guest
Feb 17th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. <?php
  2. namespace App\Example;
  3.  
  4. class Pizza
  5. {
  6. /**
  7. * @var array
  8. */
  9. protected $toppings;
  10.  
  11. /**
  12. * @var string
  13. */
  14. protected $orderId;
  15.  
  16. /**
  17. * Pizza constructor.
  18. * @param array $toppings
  19. * @param string $orderId
  20. */
  21. public function __construct(array $toppings, string $orderId)
  22. {
  23. $this->toppings = $toppings;
  24. $this->orderId = $orderId;
  25. }
  26.  
  27. /**
  28. * @return array
  29. */
  30. public function getToppings()
  31. {
  32. return $this->toppings;
  33. }
  34. }
Add Comment
Please, Sign In to add comment