1 | <?php |
||
3 | class EcommerceMoney extends Extension |
||
4 | { |
||
5 | /** |
||
6 | * returns the symbol for a currency, e.g. $. |
||
7 | * |
||
8 | * @param string $currency |
||
9 | * |
||
10 | * @return string |
||
11 | */ |
||
12 | public static function get_default_symbol($currency) |
||
18 | |||
19 | /** |
||
20 | * returns the short symbol for a currency |
||
21 | * This is shorter than the default one. |
||
22 | * |
||
23 | * @param string $currency |
||
24 | * |
||
25 | * @return string |
||
|
|||
26 | */ |
||
27 | public static function get_short_symbol($currency) |
||
39 | |||
40 | /** |
||
41 | * returns the long symbol for a currency. |
||
42 | * |
||
43 | * @param string $currency |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | public static function get_long_symbol($currency) |
||
56 | |||
57 | /** |
||
58 | * returns the default symbol for a site. |
||
59 | * with or without html. |
||
60 | * |
||
61 | * @param bool $html |
||
62 | * |
||
63 | * @return string |
||
64 | */ |
||
65 | public function NiceDefaultSymbol($html = true) |
||
69 | |||
70 | /** |
||
71 | * returns the short symbol for a site. |
||
72 | * with or without html. |
||
73 | * |
||
74 | * @param bool $html |
||
75 | * |
||
76 | * @return string |
||
77 | */ |
||
78 | public function NiceShortSymbol($html = true) |
||
88 | |||
89 | /** |
||
90 | * returns the long symbol for a site. |
||
91 | * with or without html. |
||
92 | * |
||
93 | * @param bool $html |
||
94 | * |
||
95 | * @return string |
||
96 | */ |
||
97 | public function NiceLongSymbol($html = true) |
||
111 | |||
112 | /** |
||
113 | * returns a currency like this: 8,001 usd / 12.12 nzd. |
||
114 | * |
||
115 | * @param bool $html |
||
116 | * |
||
117 | * @return string |
||
118 | */ |
||
119 | public function SymbolNumberAndCode($html = true) |
||
133 | |||
134 | /** |
||
135 | * returns the default format for a site for currency. |
||
136 | * |
||
137 | * @param bool $html |
||
138 | * |
||
139 | * @return string |
||
140 | */ |
||
141 | public function NiceDefaultFormat($html = true) |
||
147 | } |
||
148 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.