Skip to content

Instantly share code, notes, and snippets.

@araeuchle
Last active February 15, 2019 16:21
Show Gist options
  • Save araeuchle/bfcbf1dc9f4fe7739418cecb0401e48c to your computer and use it in GitHub Desktop.
Save araeuchle/bfcbf1dc9f4fe7739418cecb0401e48c to your computer and use it in GitHub Desktop.
<?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;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment