1 | <?php |
||
10 | class Product |
||
11 | { |
||
12 | /** |
||
13 | * @var SKU |
||
14 | */ |
||
15 | private $sku; |
||
16 | /** |
||
17 | * @var Slug |
||
18 | */ |
||
19 | private $slug; |
||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | private $title; |
||
|
|||
24 | /** |
||
25 | * @var Content |
||
26 | */ |
||
27 | private $content; |
||
28 | |||
29 | /** |
||
30 | * Creates a new Product basic class instance. |
||
31 | * |
||
32 | * @param SKU $sku A unique identifier for the product (e.g. "fancy-short-1") |
||
33 | * @param Slug $slug A human-readable, descriptive URL fragment for the product (e.g. |
||
34 | * "fancy-t-shirt-1-with-ice-cream-pooping-unicorn") |
||
35 | * @param Content $content A product content model |
||
36 | * |
||
37 | */ |
||
38 | 8 | public function __construct(SKU $sku, Slug $slug, Content $content) |
|
44 | |||
45 | /** |
||
46 | * Get the unique identifier for the product (e.g. "fancy-short-1") |
||
47 | * |
||
48 | * @return SKU |
||
49 | */ |
||
50 | 7 | public function getSku() |
|
54 | |||
55 | /** |
||
56 | * Get the human-readable, descriptive URL fragment for the product (e.g. |
||
57 | * "fancy-t-shirt-1-with-ice-cream-pooping-unicorn") |
||
58 | * |
||
59 | * @return Slug |
||
60 | */ |
||
61 | 7 | public function getSlug() |
|
65 | |||
66 | /** |
||
67 | * Get the title of the product (e.g. "Fancy T-Shirt No. 1") |
||
68 | * |
||
69 | * @return string |
||
70 | */ |
||
71 | 1 | public function getTitle() |
|
75 | |||
76 | /** |
||
77 | * Get a short description text of the product (e.g. "The first edition of our fancy T-Shirt with a unicorn pooping |
||
78 | * ice cream on the front") |
||
79 | * |
||
80 | * @return string |
||
81 | */ |
||
82 | 1 | public function getSummaryText() |
|
86 | |||
87 | /** |
||
88 | * Get a full product description text |
||
89 | * |
||
90 | * @return string |
||
91 | */ |
||
92 | 1 | public function getProductDescription() |
|
96 | } |
This check marks private properties in classes that are never used. Those properties can be removed.