1
1
<?php
2
+ // phpcs:ignoreFile
2
3
/**
3
4
* This file is part of phpDocumentor.
4
5
*
10
11
* @link http://phpdoc.org
11
12
*/
12
13
14
+
13
15
namespace Luigi ;
14
16
17
+
15
18
class Pizza extends \Pizza
16
19
{
17
20
const
18
21
/** @var string DELIVERY designates that the delivery method is to deliver the pizza to the customer. */
19
- DELIVERY = 'delivery ' ;
20
-
21
- const /** @var string PICKUP designates that the delivery method is that the customer picks the pizza up. */
22
+ DELIVERY = 'delivery ' ,
23
+ /** @var string PICKUP designates that the delivery method is that the customer picks the pizza up. */
22
24
PICKUP = 'pickup ' ;
23
25
24
26
/** @var static contains the active instance for this Pizza. */
25
- private static $ instance ;
27
+ static private $ instance ;
26
28
27
29
/**
28
- * @var Pizza\Style
30
+ * @var Pizza\Style $style
29
31
* @var Pizza\Sauce|null $sauce
30
32
* @var Pizza\Topping[] $toppings
31
33
*/
32
- private $ style ;
33
-
34
- private $ sauce ;
35
-
36
- private $ toppings ;
34
+ private $ style , $ sauce , $ toppings ;
37
35
38
36
/**
39
37
* The size of the pizza in centimeters, defaults to 20cm.
@@ -42,11 +40,13 @@ class Pizza extends \Pizza
42
40
*/
43
41
public $ size = \Luigi \Pizza \SIZE_20CM ;
44
42
45
- public $ legacy ; // don't use this anymore!
46
-
47
- protected $ packaging = self ::PACKAGING ;
43
+ var $ legacy ; // don't use this anymore!
48
44
49
- protected $ deliveryMethod ;
45
+ protected
46
+ /** @var string $packaging The type of packaging for this Pizza */
47
+ $ packaging = self ::PACKAGING ,
48
+ /** @var string $deliveryMethod Is the customer picking this pizza up or must it be delivered? */
49
+ $ deliveryMethod ;
50
50
51
51
private function __construct (Pizza \Style $ style )
52
52
{
@@ -59,9 +59,11 @@ private function __construct(Pizza\Style $style)
59
59
* This method can be used to instantiate a new object of this class which can then be retrieved using
60
60
* {@see self::getInstance()}.
61
61
*
62
- * @param Pizza\Style $style style of pizza
62
+ * @param Pizza\Style $style
63
63
*
64
64
* @see self::getInstance to retrieve the pizza object.
65
+ *
66
+ * @return void
65
67
*/
66
68
public static function createInstance (Pizza \Style $ style )
67
69
{
@@ -71,7 +73,7 @@ public static function createInstance(Pizza\Style $style)
71
73
/**
72
74
* @return self
73
75
*/
74
- public static function getInstance ()
76
+ static function getInstance ()
75
77
{
76
78
return self ::$ instance ;
77
79
}
0 commit comments