@@ -35,6 +35,10 @@ discard block |
||
35 | 35 | var $portable_hashes; |
36 | 36 | var $random_state; |
37 | 37 | |
38 | + /** |
|
39 | + * @param integer $iteration_count_log2 |
|
40 | + * @param boolean $portable_hashes |
|
41 | + */ |
|
38 | 42 | function __construct($iteration_count_log2, $portable_hashes) |
39 | 43 | { |
40 | 44 | $this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; |
@@ -50,6 +54,9 @@ discard block |
||
50 | 54 | $this->random_state .= getmypid(); |
51 | 55 | } |
52 | 56 | |
57 | + /** |
|
58 | + * @param integer $count |
|
59 | + */ |
|
53 | 60 | function get_random_bytes($count) |
54 | 61 | { |
55 | 62 | $output = ''; |
@@ -84,6 +91,9 @@ discard block |
||
84 | 91 | return $output; |
85 | 92 | } |
86 | 93 | |
94 | + /** |
|
95 | + * @param integer $count |
|
96 | + */ |
|
87 | 97 | function encode64($input, $count) |
88 | 98 | { |
89 | 99 | $output = ''; |
@@ -107,6 +117,9 @@ discard block |
||
107 | 117 | return $output; |
108 | 118 | } |
109 | 119 | |
120 | + /** |
|
121 | + * @param string $input |
|
122 | + */ |
|
110 | 123 | function gensalt_private($input) |
111 | 124 | { |
112 | 125 | $output = '$P$'; |
@@ -155,6 +168,9 @@ discard block |
||
155 | 168 | return $output; |
156 | 169 | } |
157 | 170 | |
171 | + /** |
|
172 | + * @param string $input |
|
173 | + */ |
|
158 | 174 | function gensalt_extended($input) |
159 | 175 | { |
160 | 176 | $count_log2 = min($this->iteration_count_log2 + 8, 24); |
@@ -173,6 +189,9 @@ discard block |
||
173 | 189 | return $output; |
174 | 190 | } |
175 | 191 | |
192 | + /** |
|
193 | + * @param string $input |
|
194 | + */ |
|
176 | 195 | function gensalt_blowfish($input) |
177 | 196 | { |
178 | 197 | # This one needs to use a different order of characters and a |
@@ -221,6 +221,9 @@ discard block |
||
221 | 221 | return $image; |
222 | 222 | } |
223 | 223 | |
224 | + /** |
|
225 | + * @param integer $len |
|
226 | + */ |
|
224 | 227 | function tep_break_string($string, $len, $break_char = '-') { |
225 | 228 | $l = 0; |
226 | 229 | $output = ''; |
@@ -333,6 +336,11 @@ discard block |
||
333 | 336 | return $geo_zone_id; |
334 | 337 | } |
335 | 338 | |
339 | + /** |
|
340 | + * @param boolean $html |
|
341 | + * @param string $boln |
|
342 | + * @param string $eoln |
|
343 | + */ |
|
336 | 344 | function tep_address_format($address_format_id, $address, $html, $boln, $eoln) { |
337 | 345 | $Qaddress = Registry::get('Db')->get('address_format', 'address_format', ['address_format_id' => (int)$address_format_id]); |
338 | 346 | |
@@ -429,6 +437,9 @@ discard block |
||
429 | 437 | return $def_state; |
430 | 438 | } |
431 | 439 | |
440 | + /** |
|
441 | + * @param string $params |
|
442 | + */ |
|
432 | 443 | function tep_get_uprid($prid, $params) { |
433 | 444 | $uprid = $prid; |
434 | 445 | if ( (is_array($params)) && (!strstr($prid, '{')) ) { |
@@ -729,6 +740,9 @@ discard block |
||
729 | 740 | |
730 | 741 | //// |
731 | 742 | // Sets the status of a banner |
743 | + /** |
|
744 | + * @param integer $status |
|
745 | + */ |
|
732 | 746 | function tep_set_banner_status($banners_id, $status) { |
733 | 747 | $OSCOM_Db = Registry::get('Db'); |
734 | 748 | |
@@ -803,6 +817,9 @@ discard block |
||
803 | 817 | |
804 | 818 | //// |
805 | 819 | // Sets the status of a product on special |
820 | + /** |
|
821 | + * @param integer $status |
|
822 | + */ |
|
806 | 823 | function tep_set_specials_status($specials_id, $status) { |
807 | 824 | $OSCOM_Db = Registry::get('Db'); |
808 | 825 | |
@@ -1252,6 +1269,9 @@ discard block |
||
1252 | 1269 | |
1253 | 1270 | //// |
1254 | 1271 | // Wrapper function for round() for php3 compatibility |
1272 | + /** |
|
1273 | + * @return double |
|
1274 | + */ |
|
1255 | 1275 | function tep_round($value, $precision) { |
1256 | 1276 | return round($value, $precision); |
1257 | 1277 | } |
@@ -79,6 +79,9 @@ discard block |
||
79 | 79 | |
80 | 80 | //// |
81 | 81 | // Break a word in a string if it is longer than a specified length ($len) |
82 | + /** |
|
83 | + * @param integer $len |
|
84 | + */ |
|
82 | 85 | function tep_break_string($string, $len, $break_char = '-') { |
83 | 86 | $l = 0; |
84 | 87 | $output = ''; |
@@ -246,6 +249,9 @@ discard block |
||
246 | 249 | |
247 | 250 | //// |
248 | 251 | // Wrapper function for round() |
252 | + /** |
|
253 | + * @return double |
|
254 | + */ |
|
249 | 255 | function tep_round($number, $precision) { |
250 | 256 | if (strpos($number, '.') && (strlen(substr($number, strpos($number, '.')+1)) > $precision)) { |
251 | 257 | $number = substr($number, 0, strpos($number, '.') + 1 + $precision + 1); |
@@ -425,6 +431,11 @@ discard block |
||
425 | 431 | //// |
426 | 432 | // Return a formatted address |
427 | 433 | // TABLES: address_format |
434 | + /** |
|
435 | + * @param boolean $html |
|
436 | + * @param string $boln |
|
437 | + * @param string $eoln |
|
438 | + */ |
|
428 | 439 | function tep_address_format($address_format_id, $address, $html, $boln, $eoln) { |
429 | 440 | $OSCOM_Db = Registry::get('Db'); |
430 | 441 | |
@@ -918,6 +929,9 @@ discard block |
||
918 | 929 | |
919 | 930 | //// |
920 | 931 | // Return a product ID with attributes |
932 | + /** |
|
933 | + * @param string $params |
|
934 | + */ |
|
921 | 935 | function tep_get_uprid($prid, $params) { |
922 | 936 | if (is_numeric($prid)) { |
923 | 937 | $uprid = (int)$prid; |
@@ -90,6 +90,10 @@ discard block |
||
90 | 90 | return $image; |
91 | 91 | } |
92 | 92 | |
93 | + /** |
|
94 | + * @param string $name |
|
95 | + * @param string $action |
|
96 | + */ |
|
93 | 97 | public static function form($name, $action, $method = 'post', $parameters = '', array $flags = []) |
94 | 98 | { |
95 | 99 | if (!isset($flags['tokenize']) || !is_bool($flags['tokenize'])) { |
@@ -162,6 +166,9 @@ discard block |
||
162 | 166 | return static::inputField($name, null, $parameters, 'file', false); |
163 | 167 | } |
164 | 168 | |
169 | + /** |
|
170 | + * @param string $type |
|
171 | + */ |
|
165 | 172 | protected static function selectionField($name, $type, $value = '', $checked = false, $parameters = '') |
166 | 173 | { |
167 | 174 | $selection = '<input type="' . static::output($type) . '" name="' . static::output($name) . '"'; |
@@ -183,6 +190,9 @@ discard block |
||
183 | 190 | return $selection; |
184 | 191 | } |
185 | 192 | |
193 | + /** |
|
194 | + * @param string $name |
|
195 | + */ |
|
186 | 196 | public static function checkboxField($name, $value = '', $checked = false, $parameters = '') |
187 | 197 | { |
188 | 198 | return static::selectionField($name, 'checkbox', $value, $checked, $parameters); |
@@ -193,6 +203,11 @@ discard block |
||
193 | 203 | return static::selectionField($name, 'radio', $value, $checked, $parameters); |
194 | 204 | } |
195 | 205 | |
206 | + /** |
|
207 | + * @param string $name |
|
208 | + * @param integer $width |
|
209 | + * @param integer $height |
|
210 | + */ |
|
196 | 211 | public static function textareaField($name, $width, $height, $text = '', $parameters = '', $reinsert_value = true, $class = 'form-control') |
197 | 212 | { |
198 | 213 | $field = '<textarea name="' . static::output($name) . '" cols="' . static::output($width) . '" rows="' . static::output($height) . '"'; |
@@ -312,6 +327,10 @@ discard block |
||
312 | 327 | return $field; |
313 | 328 | } |
314 | 329 | |
330 | + /** |
|
331 | + * @param string $icon |
|
332 | + * @param string $link |
|
333 | + */ |
|
315 | 334 | public static function button($title = null, $icon = null, $link = null, $params = null, $class = null) |
316 | 335 | { |
317 | 336 | $types = ['submit', 'button', 'reset']; |
@@ -16,6 +16,9 @@ discard block |
||
16 | 16 | |
17 | 17 | //// |
18 | 18 | // Sets the status of a banner |
19 | + /** |
|
20 | + * @param integer $status |
|
21 | + */ |
|
19 | 22 | function tep_set_banner_status($banners_id, $status) { |
20 | 23 | $OSCOM_Db = Registry::get('Db'); |
21 | 24 | |
@@ -106,6 +109,9 @@ discard block |
||
106 | 109 | |
107 | 110 | //// |
108 | 111 | // Check to see if a banner exists |
112 | + /** |
|
113 | + * @param string $action |
|
114 | + */ |
|
109 | 115 | function tep_banner_exists($action, $identifier) { |
110 | 116 | $OSCOM_Db = Registry::get('Db'); |
111 | 117 |
@@ -74,6 +74,10 @@ |
||
74 | 74 | return $this->_code; |
75 | 75 | } |
76 | 76 | |
77 | + /** |
|
78 | + * @param string $block |
|
79 | + * @param string $group |
|
80 | + */ |
|
77 | 81 | function addBlock($block, $group) { |
78 | 82 | $this->_blocks[$group][] = $block; |
79 | 83 | } |
@@ -24,6 +24,9 @@ discard block |
||
24 | 24 | $content_transfer_encoding = '7bit', |
25 | 25 | $charset = 'utf-8'; |
26 | 26 | |
27 | + /** |
|
28 | + * @param string $subject |
|
29 | + */ |
|
27 | 30 | public function __construct($to_email_address = null, $to = null, $from_email_address = null, $from = null, $subject = null) |
28 | 31 | { |
29 | 32 | if (!empty($to_email_address)) { |
@@ -91,6 +94,9 @@ discard block |
||
91 | 94 | $this->subject = $subject; |
92 | 95 | } |
93 | 96 | |
97 | + /** |
|
98 | + * @param string $text |
|
99 | + */ |
|
94 | 100 | public function setBody($text, $html = null) |
95 | 101 | { |
96 | 102 | $this->setBodyPlain($text); |
@@ -124,6 +130,9 @@ discard block |
||
124 | 130 | $this->charset = $charset; |
125 | 131 | } |
126 | 132 | |
133 | + /** |
|
134 | + * @param string $key |
|
135 | + */ |
|
127 | 136 | public function addHeader($key, $value) |
128 | 137 | { |
129 | 138 | if ((strpos($key, "\n") !== false) || (strpos($key, "\r") !== false)) { |
@@ -377,6 +386,9 @@ discard block |
||
377 | 386 | ini_restore('sendmail_from'); |
378 | 387 | } |
379 | 388 | |
389 | + /** |
|
390 | + * @param string $file |
|
391 | + */ |
|
380 | 392 | protected function get_mime_type($file) |
381 | 393 | { |
382 | 394 | $ext = substr($file, strrpos($file, '.') + 1); |
@@ -400,6 +412,9 @@ discard block |
||
400 | 412 | } |
401 | 413 | } |
402 | 414 | |
415 | + /** |
|
416 | + * @param string $boundary |
|
417 | + */ |
|
403 | 418 | protected function build_attachment($attachment, $boundary) |
404 | 419 | { |
405 | 420 | return '--' . $boundary . "\n" . |
@@ -409,6 +424,9 @@ discard block |
||
409 | 424 | $attachment['data'] . "\n\n"; |
410 | 425 | } |
411 | 426 | |
427 | + /** |
|
428 | + * @param string $boundary |
|
429 | + */ |
|
412 | 430 | protected function build_image($image, $boundary) |
413 | 431 | { |
414 | 432 | return '--' . $boundary . "\n" . |