Completed
Pull Request — 23 (#431)
by Harald
05:50
created
catalog/includes/apps/paypal/modules/EC/EC.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -69,6 +69,9 @@
 block discarded – undo
69 69
       return $this->doMigrationCheck($this->_pm_code) || $this->doMigrationCheck($this->_pm_pf_code);
70 70
     }
71 71
 
72
+    /**
73
+     * @param string $class
74
+     */
72 75
     function doMigrationCheck($class) {
73 76
       if ( file_exists(DIR_FS_CATALOG . 'includes/modules/payment/' . $class . '.php') ) {
74 77
         if ( !class_exists($class) ) {
Please login to merge, or discard this patch.
catalog/includes/apps/paypal/OSCOM_PayPal.php 1 patch
Doc Comments   +35 added lines patch added patch discarded remove patch
@@ -42,6 +42,9 @@  discard block
 block discarded – undo
42 42
       return $countries;
43 43
     }
44 44
 
45
+    /**
46
+     * @param integer $result
47
+     */
45 48
     function log($module, $action, $result, $request, $response, $server, $is_ipn = false) {
46 49
       global $customer_id;
47 50
 
@@ -182,6 +185,9 @@  discard block
 block discarded – undo
182 185
       return false;
183 186
     }
184 187
 
188
+    /**
189
+     * @param string $info
190
+     */
185 191
     function getModuleInfo($module, $info) {
186 192
       $class = 'OSCOM_PayPal_' . $module;
187 193
 
@@ -196,6 +202,10 @@  discard block
 block discarded – undo
196 202
       return $m->{'_' . $info};
197 203
     }
198 204
 
205
+    /**
206
+     * @param string $module
207
+     * @param string $type
208
+     */
199 209
     function hasCredentials($module, $type = null) {
200 210
       $server = constant('OSCOM_APP_PAYPAL_' . $module . '_STATUS');
201 211
 
@@ -230,6 +240,10 @@  discard block
 block discarded – undo
230 240
       return true;
231 241
     }
232 242
 
243
+    /**
244
+     * @param string $module
245
+     * @param string $type
246
+     */
233 247
     function getCredentials($module, $type) {
234 248
       if ( constant('OSCOM_APP_PAYPAL_' . $module . '_STATUS') == '1' ) {
235 249
         if ( $type == 'email') {
@@ -377,6 +391,11 @@  discard block
 block discarded – undo
377 391
     }
378 392
 
379 393
 // APP calls require $server to be "live" or "sandbox"
394
+    /**
395
+     * @param string $module
396
+     * @param string $call
397
+     * @param string $server
398
+     */
380 399
     function getApiResult($module, $call, $extra_params = null, $server = null, $is_ipn = false) {
381 400
       if ( $module == 'APP' ) {
382 401
         $function = 'OSCOM_PayPal_Api_' . $call;
@@ -403,6 +422,9 @@  discard block
 block discarded – undo
403 422
       return $result['res'];
404 423
     }
405 424
 
425
+    /**
426
+     * @param string $parameters
427
+     */
406 428
     function makeApiCall($url, $parameters = null, $headers = null) {
407 429
       $server = parse_url($url);
408 430
 
@@ -461,6 +483,10 @@  discard block
 block discarded – undo
461 483
       return $result;
462 484
     }
463 485
 
486
+    /**
487
+     * @param string $link
488
+     * @param string $type
489
+     */
464 490
     function drawButton($title = null, $link = null, $type = null, $params = null, $force_css = false) {
465 491
       $colours = array('success' => '#1cb841',
466 492
                        'error' => '#ca3c3c',
@@ -752,6 +778,9 @@  discard block
 block discarded – undo
752 778
       }
753 779
     }
754 780
 
781
+    /**
782
+     * @param string $filename
783
+     */
755 784
     public function loadLanguageFile($filename, $lang = null) {
756 785
       global $language;
757 786
 
@@ -793,6 +822,9 @@  discard block
 block discarded – undo
793 822
       }
794 823
     }
795 824
 
825
+    /**
826
+     * @param string $key
827
+     */
796 828
     function getDef($key, $values = null) {
797 829
       $def = isset($this->_definitions[$key]) ? $this->_definitions[$key] : $key;
798 830
 
@@ -863,6 +895,9 @@  discard block
 block discarded – undo
863 895
       return str_replace('/', DIRECTORY_SEPARATOR, $pathname);
864 896
     }
865 897
 // OSCOM v2.2rc2a compatibility
898
+    /**
899
+     * @return string
900
+     */
866 901
     function getIpAddress() {
867 902
       if ( function_exists('tep_get_ip_address') ) {
868 903
         return tep_get_ip_address();
Please login to merge, or discard this patch.
catalog/includes/classes/email.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -82,6 +82,7 @@  discard block
 block discarded – undo
82 82
  * it. This can then be given as the first
83 83
  * argument of the the functions
84 84
  * add_html_image() or add_attachment().
85
+ * @param string $filename
85 86
  */
86 87
 
87 88
     function get_file($filename) {
@@ -153,6 +154,7 @@  discard block
 block discarded – undo
153 154
  * Adds a html part to the mail.
154 155
  * Also replaces image names with
155 156
  * content-id's.
157
+ * @param string $text
156 158
  */
157 159
 
158 160
     function add_html($html, $text = NULL, $images_dir = NULL) {
@@ -165,6 +167,7 @@  discard block
 block discarded – undo
165 167
 /**
166 168
  * Adds an image to the list of embedded
167 169
  * images.
170
+ * @param string $file
168 171
  */
169 172
 
170 173
     function add_html_image($file, $name = '', $c_type='application/octet-stream') {
@@ -239,6 +242,9 @@  discard block
 block discarded – undo
239 242
 
240 243
 /* HPDL PHP3 */
241 244
 //    function &add_alternative_part(&$obj) {
245
+    /**
246
+     * @param null|mime $obj
247
+     */
242 248
     function add_alternative_part(&$obj) {
243 249
       $params['content_type'] = 'multipart/alternative';
244 250
 
Please login to merge, or discard this patch.
catalog/includes/classes/hooks.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -20,6 +20,9 @@
 block discarded – undo
20 20
       $this->register('global');
21 21
     }
22 22
 
23
+    /**
24
+     * @param string $group
25
+     */
23 26
     function register($group) {
24 27
       $group = basename($group);
25 28
 
Please login to merge, or discard this patch.
catalog/includes/classes/http_client.php 1 patch
Doc Comments   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 /**
111 111
  * addHeader
112 112
  * set a unique request header
113
- * @param headerName the header name
113
+ * @param headerName string header name
114 114
  * @param headerValue the header value, ( unencoded)
115 115
  **/
116 116
     function addHeader($headerName, $headerValue) {
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 /**
121 121
  * removeHeader
122 122
  * unset a request header
123
- * @param headerName the header name
123
+ * @param headerName string header name
124 124
  **/
125 125
     function removeHeader($headerName) {
126 126
       unset($this->requestHeaders[$headerName]);
@@ -172,6 +172,7 @@  discard block
 block discarded – undo
172 172
  * get
173 173
  * issue a GET http request
174 174
  * @param uri URI (path on server) or full URL of the document
175
+ * @param string $url
175 176
  * @return string response status code (200 if ok)
176 177
  * @seeAlso getHeaders(), getBody()
177 178
  **/
@@ -309,7 +310,8 @@  discard block
 block discarded – undo
309 310
  * a) the command
310 311
  * b) the request headers if they are defined
311 312
  * c) the request body if defined
312
- * @return string the server repsonse status code
313
+ * @param string $command
314
+ * @return boolean|null the server repsonse status code
313 315
  **/
314 316
     function sendCommand($command) {
315 317
       $this->responseHeaders = array();
@@ -433,7 +435,7 @@  discard block
 block discarded – undo
433 435
 /**
434 436
  * Calculate and return the URI to be sent ( proxy purpose )
435 437
  * @param the local URI
436
- * @return URI to be used in the HTTP request
438
+ * @return string to be used in the HTTP request
437 439
  * @scope private
438 440
  **/
439 441
     function makeUri($uri) {
Please login to merge, or discard this patch.
catalog/includes/classes/language.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -70,6 +70,9 @@
 block discarded – undo
70 70
       $this->set_language($lng);
71 71
     }
72 72
 
73
+    /**
74
+     * @param string $language
75
+     */
73 76
     function set_language($language) {
74 77
       if ( (tep_not_null($language)) && (isset($this->catalog_languages[$language])) ) {
75 78
         $this->language = $this->catalog_languages[$language];
Please login to merge, or discard this patch.
catalog/includes/functions/compatibility.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -55,6 +55,10 @@
 block discarded – undo
55 55
   }
56 56
 
57 57
   if (!function_exists('checkdnsrr')) {
58
+
59
+    /**
60
+     * @param string $type
61
+     */
58 62
     function checkdnsrr($host, $type) {
59 63
       if(tep_not_null($host) && tep_not_null($type)) {
60 64
         @exec("nslookup -type=" . escapeshellarg($type) . " " . escapeshellarg($host), $output);
Please login to merge, or discard this patch.
catalog/includes/functions/database.php 1 patch
Doc Comments   +13 added lines patch added patch discarded remove patch
@@ -32,6 +32,10 @@  discard block
 block discarded – undo
32 32
     return mysqli_close($$link);
33 33
   }
34 34
 
35
+  /**
36
+   * @param integer $errno
37
+   * @param string $error
38
+   */
35 39
   function tep_db_error($query, $errno, $error) { 
36 40
     if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
37 41
       error_log('ERROR: [' . $errno . '] ' . $error . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
@@ -52,6 +56,9 @@  discard block
 block discarded – undo
52 56
     return $result;
53 57
   }
54 58
 
59
+  /**
60
+   * @param string $table
61
+   */
55 62
   function tep_db_perform($table, $data, $action = 'insert', $parameters = '', $link = 'db_link') {
56 63
     reset($data);
57 64
     if ($action == 'insert') {
@@ -191,6 +198,9 @@  discard block
 block discarded – undo
191 198
       return mysql_error($link);
192 199
     }
193 200
 
201
+    /**
202
+     * @param string $charset
203
+     */
194 204
     function mysqli_set_charset($link, $charset) {
195 205
       if ( function_exists('mysql_set_charset') ) {
196 206
         return mysql_set_charset($charset, $link);
@@ -221,6 +231,9 @@  discard block
 block discarded – undo
221 231
       return mysql_error($link);
222 232
     }
223 233
 
234
+    /**
235
+     * @param integer $type
236
+     */
224 237
     function mysqli_fetch_array($query, $type) {
225 238
       return mysql_fetch_array($query, $type);
226 239
     }
Please login to merge, or discard this patch.
catalog/includes/functions/general.php 1 patch
Doc Comments   +36 added lines patch added patch discarded remove patch
@@ -81,6 +81,9 @@  discard block
 block discarded – undo
81 81
 
82 82
 ////
83 83
 // Return a random row from a database query
84
+  /**
85
+   * @param string $query
86
+   */
84 87
   function tep_random_select($query) {
85 88
     $random_product = '';
86 89
     $random_query = tep_db_query($query);
@@ -145,6 +148,10 @@  discard block
 block discarded – undo
145 148
 
146 149
 ////
147 150
 // Break a word in a string if it is longer than a specified length ($len)
151
+  /**
152
+   * @param string $string
153
+   * @param integer $len
154
+   */
148 155
   function tep_break_string($string, $len, $break_char = '-') {
149 156
     $l = 0;
150 157
     $output = '';
@@ -260,6 +267,9 @@  discard block
 block discarded – undo
260 267
 
261 268
 ////
262 269
 // Returns the clients browser
270
+  /**
271
+   * @param string $component
272
+   */
263 273
   function tep_browser_detect($component) {
264 274
     global $HTTP_USER_AGENT;
265 275
 
@@ -302,6 +312,9 @@  discard block
 block discarded – undo
302 312
 
303 313
 ////
304 314
 // Wrapper function for round()
315
+  /**
316
+   * @return double
317
+   */
305 318
   function tep_round($number, $precision) {
306 319
     if (strpos($number, '.') && (strlen(substr($number, strpos($number, '.')+1)) > $precision)) {
307 320
       $number = substr($number, 0, strpos($number, '.') + 1 + $precision + 1);
@@ -448,6 +461,11 @@  discard block
 block discarded – undo
448 461
 ////
449 462
 // Return a formatted address
450 463
 // TABLES: address_format
464
+  /**
465
+   * @param boolean $html
466
+   * @param string $boln
467
+   * @param string $eoln
468
+   */
451 469
   function tep_address_format($address_format_id, $address, $html, $boln, $eoln) {
452 470
     $address_format_query = tep_db_query("select address_format as format from " . TABLE_ADDRESS_FORMAT . " where address_format_id = '" . (int)$address_format_id . "'");
453 471
     $address_format = tep_db_fetch_array($address_format_query);
@@ -940,6 +958,9 @@  discard block
 block discarded – undo
940 958
 
941 959
 ////
942 960
 // Return a product ID with attributes
961
+  /**
962
+   * @param string $params
963
+   */
943 964
   function tep_get_uprid($prid, $params) {
944 965
     if (is_numeric($prid)) {
945 966
       $uprid = (int)$prid;
@@ -1036,6 +1057,11 @@  discard block
 block discarded – undo
1036 1057
 // $from_email_adress The eMail address of the sender,
1037 1058
 //                    e.g. [email protected]
1038 1059
 
1060
+  /**
1061
+   * @param string $to_name
1062
+   * @param string $email_subject
1063
+   * @param string $email_text
1064
+   */
1039 1065
   function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {
1040 1066
     if (SEND_EMAILS != 'true') return false;
1041 1067
 
@@ -1104,6 +1130,9 @@  discard block
 block discarded – undo
1104 1130
     return tep_count_modules(MODULE_SHIPPING_INSTALLED);
1105 1131
   }
1106 1132
 
1133
+  /**
1134
+   * @param integer $length
1135
+   */
1107 1136
   function tep_create_random_value($length, $type = 'mixed') {
1108 1137
     if ( ($type != 'mixed') && ($type != 'chars') && ($type != 'digits')) $type = 'mixed';
1109 1138
 
@@ -1253,6 +1282,10 @@  discard block
 block discarded – undo
1253 1282
 
1254 1283
 ////
1255 1284
 // Return a random value
1285
+  /**
1286
+   * @param integer $min
1287
+   * @param integer $max
1288
+   */
1256 1289
   function tep_rand($min = null, $max = null) {
1257 1290
     static $seeded;
1258 1291
 
@@ -1386,6 +1419,9 @@  discard block
 block discarded – undo
1386 1419
   }
1387 1420
 
1388 1421
 // nl2br() prior PHP 4.2.0 did not convert linefeeds on all OSs (it only converted \n)
1422
+  /**
1423
+   * @param string[] $from
1424
+   */
1389 1425
   function tep_convert_linefeeds($from, $to, $string) {
1390 1426
     if ((PHP_VERSION < "4.0.5") && is_array($from)) {
1391 1427
       return preg_replace('/(' . implode('|', $from) . ')/', $to, $string);
Please login to merge, or discard this patch.