@@ -72,7 +72,7 @@ interface Valued
72
72
{
73
73
const BASE_PRICE = 1 ;
74
74
75
- public function getPrice ();
75
+ function getPrice ();
76
76
}
77
77
78
78
interface Series
@@ -100,6 +100,8 @@ public function add()
100
100
/**
101
101
* Calculates the price for this specific component.
102
102
*
103
+ * @param float[] $...additionalPrices Additional costs may be passed
104
+ *
103
105
* @return float
104
106
*/
105
107
abstract protected function calculatePrice ();
@@ -193,24 +195,19 @@ class Pizza implements Pizza\Valued
193
195
194
196
const
195
197
/** @var string DELIVERY designates that the delivery method is to deliver the pizza to the customer. */
196
- DELIVERY = 'delivery ' ;
197
-
198
- const /** @var string PICKUP designates that the delivery method is that the customer picks the pizza up. */
198
+ DELIVERY = 'delivery ' ,
199
+ /** @var string PICKUP designates that the delivery method is that the customer picks the pizza up. */
199
200
PICKUP = 'pickup ' ;
200
201
201
202
/** @var static contains the active instance for this Pizza. */
202
- private static $ instance ;
203
+ static private $ instance ;
203
204
204
205
/**
205
- * @var Pizza\Style
206
+ * @var Pizza\Style $style
206
207
* @var Pizza\Sauce|null $sauce
207
208
* @var Pizza\Topping[] $toppings
208
209
*/
209
- private $ style ;
210
-
211
- private $ sauce ;
212
-
213
- private $ toppings ;
210
+ private $ style , $ sauce , $ toppings ;
214
211
215
212
/**
216
213
* The size of the pizza in centimeters, defaults to 20cm.
@@ -219,11 +216,13 @@ class Pizza implements Pizza\Valued
219
216
*/
220
217
public $ size = \Luigi \Pizza \SIZE_20CM ;
221
218
222
- public $ legacy ; // don't use this anymore!
219
+ var $ legacy ; // don't use this anymore!
223
220
224
- protected $ packaging = self ::PACKAGING ;
225
-
226
- protected $ deliveryMethod ;
221
+ protected
222
+ /** @var string $packaging The type of packaging for this Pizza */
223
+ $ packaging = self ::PACKAGING ,
224
+ /** @var string $deliveryMethod Is the customer picking this pizza up or must it be delivered? */
225
+ $ deliveryMethod ;
227
226
228
227
private function __construct (Pizza \Style $ style )
229
228
{
@@ -236,7 +235,11 @@ private function __construct(Pizza\Style $style)
236
235
* This method can be used to instantiate a new object of this class which can then be retrieved using
237
236
* {@see self::getInstance()}.
238
237
*
238
+ * @param Pizza\Style $style
239
+ *
239
240
* @see self::getInstance to retrieve the pizza object.
241
+ *
242
+ * @return void
240
243
*/
241
244
public static function createInstance (Pizza \Style $ style )
242
245
{
@@ -246,7 +249,7 @@ public static function createInstance(Pizza\Style $style)
246
249
/**
247
250
* @return self
248
251
*/
249
- public static function getInstance ()
252
+ static function getInstance ()
250
253
{
251
254
return self ::$ instance ;
252
255
}
0 commit comments