Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Example;
- class Pizza
- {
- /**
- * @var array
- */
- protected $toppings;
- /**
- * @var string
- */
- protected $orderId;
- /**
- * Pizza constructor.
- * @param array $toppings
- * @param string $orderId
- */
- public function __construct(array $toppings, string $orderId)
- {
- $this->toppings = $toppings;
- $this->orderId = $orderId;
- }
- /**
- * @return array
- */
- public function getToppings()
- {
- return $this->toppings;
- }
- }
Add Comment
Please, Sign In to add comment