@@ -51,7 +51,6 @@ |
||
| 51 | 51 | /** |
| 52 | 52 | * OPTIONS - |
| 53 | 53 | * |
| 54 | - * @param array $input |
|
| 55 | 54 | * |
| 56 | 55 | * @return array |
| 57 | 56 | */ |
@@ -198,9 +198,9 @@ discard block |
||
| 198 | 198 | /** |
| 199 | 199 | * DEBUG LOG - Save a file on the server with content for loggin different action sended |
| 200 | 200 | * |
| 201 | - * @param string $service (Name module or post type) |
|
| 202 | 201 | * @param array $array_message ('object_id', 'message') |
| 203 | 202 | * @param int $criticality The message crit rate (0-2) |
| 203 | + * @param string $name |
|
| 204 | 204 | */ |
| 205 | 205 | public static function log_datas_in_files( $name, $array_message, $criticality ) { |
| 206 | 206 | $upload_dir = wp_upload_dir(); |
@@ -269,7 +269,8 @@ discard block |
||
| 269 | 269 | /** |
| 270 | 270 | * check_need_rotate Checks if the file exceeds the maximum size |
| 271 | 271 | * |
| 272 | - * @param string $file_link The file path to write |
|
| 272 | + * @param string $name |
|
| 273 | + * @param string $message |
|
| 273 | 274 | */ |
| 274 | 275 | public static function check_need_rotate( $service, $name, $message ) { |
| 275 | 276 | $upload_dir = wp_upload_dir(); |
@@ -355,6 +356,9 @@ discard block |
||
| 355 | 356 | return $getted_service; |
| 356 | 357 | } |
| 357 | 358 | |
| 359 | + /** |
|
| 360 | + * @param integer $id |
|
| 361 | + */ |
|
| 358 | 362 | public static function get_service_by_id( $id ) { |
| 359 | 363 | $array_service = get_option( '_wpeo_log_settings', array() ); |
| 360 | 364 | |
@@ -381,7 +385,7 @@ discard block |
||
| 381 | 385 | * @param float $input |
| 382 | 386 | * @param string $format |
| 383 | 387 | * @param boolean $convert |
| 384 | - * @return float|number |
|
| 388 | + * @return double |
|
| 385 | 389 | */ |
| 386 | 390 | function convert_to($input, $format, $convert = true) { |
| 387 | 391 | if($format == 'oc') |
@@ -156,7 +156,6 @@ |
||
| 156 | 156 | /** |
| 157 | 157 | * Retourne une liste de taxinomies selon les paramètres donnés / Return a taxonomy list according to given parameters |
| 158 | 158 | * |
| 159 | - * @param array $args_where Optionnal Les paramètres du filtre permettant de récupérer les taxinomies / Parameters allowing to retrieve taxonomies |
|
| 160 | 159 | * @param boolean $cropped Optionnal Permet de choisir si il faut retourner la taxinomie complète ou uniquement les chamsp principaux / Allow to define if the taxonomy must be completly returned or just main fileds must be returned |
| 161 | 160 | * |
| 162 | 161 | * @return array La liste des taxinomies correspondantes aux paramètres / Taxonomies corresping to parameters |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | * Return a variable with some basic treatment |
| 96 | 96 | * |
| 97 | 97 | * @param mixed $varToSanitize The variable we want to treat for future use |
| 98 | - * @param mixed $varDefaultValue The default value to set to the variable if the different test are not successfull |
|
| 98 | + * @param string $varDefaultValue The default value to set to the variable if the different test are not successfull |
|
| 99 | 99 | * @param string $varType optionnal The type of the var for better verification |
| 100 | 100 | * |
| 101 | 101 | * @return mixed $sanitizedVar The var after treatment |
@@ -223,6 +223,7 @@ discard block |
||
| 223 | 223 | * Return unit sigle |
| 224 | 224 | * @param unknown_type $code |
| 225 | 225 | * @param unknown_type $column_to_return |
| 226 | + * @return string |
|
| 226 | 227 | */ |
| 227 | 228 | public static function wpshop_get_sigle($code, $column_to_return = "unit") { |
| 228 | 229 | $tmp_code = (int)$code; |
@@ -316,7 +317,7 @@ discard block |
||
| 316 | 317 | * Transform a given text with a specific pattern, send by the second parameter |
| 317 | 318 | * |
| 318 | 319 | * @param string $toSlugify The string we want to "clean" for future use |
| 319 | - * @param array|string $slugifyType The type of cleaning we are going to do on the input text |
|
| 320 | + * @param string[] $slugifyType The type of cleaning we are going to do on the input text |
|
| 320 | 321 | * |
| 321 | 322 | * @return string $slugified The input string that was slugified with the selected method |
| 322 | 323 | */ |
@@ -117,10 +117,7 @@ discard block |
||
| 117 | 117 | /** |
| 118 | 118 | * Get the sub categories of a given category |
| 119 | 119 | * |
| 120 | - * @param integer $parent_category The main category we want to have the sub categories for |
|
| 121 | - * @param array $instance The current instance of the widget, allows to get the different selected parameters |
|
| 122 | - * |
|
| 123 | - * @return mixed $widget_content The widget content build from option |
|
| 120 | + * @return string |
|
| 124 | 121 | */ |
| 125 | 122 | public static function category_tree_output($category_id = 0, $instance) { |
| 126 | 123 | global $category_has_sub_category; |
@@ -285,7 +282,7 @@ discard block |
||
| 285 | 282 | * @param object $category The category definition |
| 286 | 283 | * @param string $output_type The output type defined from plugin option |
| 287 | 284 | * |
| 288 | - * @return mixed $content Output the category list |
|
| 285 | + * @return string $content Output the category list |
|
| 289 | 286 | */ |
| 290 | 287 | public static function category_mini_output($category, $output_type = 'list'){ |
| 291 | 288 | $content = ''; |
@@ -420,7 +417,6 @@ discard block |
||
| 420 | 417 | * @see wp_get_attachment_image_src |
| 421 | 418 | * @param unknown_type $id |
| 422 | 419 | * @param unknown_type $size |
| 423 | - * @param unknown_type $attr |
|
| 424 | 420 | * @return (string or array) |
| 425 | 421 | */ |
| 426 | 422 | public static function get_the_category_thumbnail($id, $size = 'thumbnail', $icon = false) { |
@@ -120,6 +120,7 @@ discard block |
||
| 120 | 120 | * Save a new attribute in database |
| 121 | 121 | * |
| 122 | 122 | * @param array $informationsToSet An array with the different information we want to set |
| 123 | + * @param string $dataBaseTable |
|
| 123 | 124 | * |
| 124 | 125 | * @return string $requestResponse A message that allows to know if the creation has been done correctly or not |
| 125 | 126 | */ |
@@ -141,6 +142,7 @@ discard block |
||
| 141 | 142 | * Update an existing attribute in database |
| 142 | 143 | * |
| 143 | 144 | * @param array $informationsToSet An array with the different information we want to set |
| 145 | + * @param string $dataBaseTable |
|
| 144 | 146 | * |
| 145 | 147 | * @return string $requestResponse A message that allows to know if the update has been done correctly or not |
| 146 | 148 | */ |
@@ -191,10 +191,10 @@ discard block |
||
| 191 | 191 | * Return a complete html table with header, body and content |
| 192 | 192 | * |
| 193 | 193 | * @param string $tableId The unique identifier of the table in the document |
| 194 | - * @param array $tableTitles An array with the different element to put into the table's header and footer |
|
| 194 | + * @param string[] $tableTitles An array with the different element to put into the table's header and footer |
|
| 195 | 195 | * @param array $tableRows An array with the different value to put into the table's body |
| 196 | - * @param array $tableClasses An array with the different class to affect to table rows and cols |
|
| 197 | - * @param array $tableRowsId An array with the different identifier for table lines |
|
| 196 | + * @param string[] $tableClasses An array with the different class to affect to table rows and cols |
|
| 197 | + * @param string[] $tableRowsId An array with the different identifier for table lines |
|
| 198 | 198 | * @param string $tableSummary A summary for the table |
| 199 | 199 | * @param boolean $withFooter Allow to define if the table must be create with a footer or not |
| 200 | 200 | * |
@@ -274,6 +274,7 @@ discard block |
||
| 274 | 274 | * |
| 275 | 275 | * @param string $file_name The file name to check if exists in current theme |
| 276 | 276 | * @param string $dir_name Optionnal The directory name of the file to check Default : wpshop |
| 277 | + * @param string $default_dir |
|
| 277 | 278 | * |
| 278 | 279 | * @return string $file_path The good filepath to include |
| 279 | 280 | */ |
@@ -299,7 +300,7 @@ discard block |
||
| 299 | 300 | * Check if the current shop use the first method for templates. One file per element to display |
| 300 | 301 | * |
| 301 | 302 | * @param string $template_part The part to take display for, will be usefull to check what file take in care if there were a file in old method |
| 302 | - * @param string $default_template_dirThe part of website to check template for. Possible values : wpshop / admin |
|
| 303 | + * @param string $default_template_dir part of website to check template for. Possible values : wpshop / admin |
|
| 303 | 304 | * |
| 304 | 305 | * @return array First index represent if there is a file for old version support, Second index represent the file to get for support old version |
| 305 | 306 | */ |
@@ -546,6 +547,7 @@ discard block |
||
| 546 | 547 | * @param string $part The part of shop where to display the given template element |
| 547 | 548 | * @param string $template_part The template element we want to display |
| 548 | 549 | * @param array $extras_args Allows to define some parameters to spot a specific template for example |
| 550 | + * @param string $default_template_dir |
|
| 549 | 551 | * |
| 550 | 552 | * @return string The good template to take in care, regarding on the given parameters |
| 551 | 553 | */ |
@@ -742,7 +744,7 @@ discard block |
||
| 742 | 744 | * Change output for product page |
| 743 | 745 | * |
| 744 | 746 | * @param string $content The content of a post |
| 745 | - * @return Ambigous <mixed, string>|unknown |
|
| 747 | + * @return string <mixed, string>|unknown |
|
| 746 | 748 | */ |
| 747 | 749 | public static function products_page( $content = '' ) { |
| 748 | 750 | global $wp_query; |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * @param string $method The default method for the form Default is set to post |
| 31 | 31 | * @param string $action The default action for the form Default is set to empty |
| 32 | 32 | * |
| 33 | - * @return mixed $the_form The complete html output of the form |
|
| 33 | + * @return string $the_form The complete html output of the form |
|
| 34 | 34 | */ |
| 35 | 35 | function form($name, $input_list, $method = 'post', $action = ''){ |
| 36 | 36 | $the_form_content_hidden = $the_form_content = ''; |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | * @param string $type The input type Could be: text or hidden or passowrd |
| 130 | 130 | * @param string $option Allows to define options for the input Could be readonly or disabled or style |
| 131 | 131 | * |
| 132 | - * @return mixed The output code to add to the form |
|
| 132 | + * @return string The output code to add to the form |
|
| 133 | 133 | */ |
| 134 | 134 | public static function form_input($name, $id, $value = '', $type = 'text', $option = '', $input_label = ''){ |
| 135 | 135 | $allowedType = array('text', 'hidden', 'password', 'file'); |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | * @param mixed $value The default value for the field Default is empty |
| 153 | 153 | * @param string $option Allows to define options for the input Could be maxlength or style |
| 154 | 154 | * |
| 155 | - * @return mixed The output code to add to the form |
|
| 155 | + * @return string The output code to add to the form |
|
| 156 | 156 | */ |
| 157 | 157 | public static function form_input_textarea($name, $id, $value = '', $option = '') |
| 158 | 158 | { |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | * @param mixed $value The selected value for the field Default is empty |
| 168 | 168 | * @param string $option Allows to define options for the input Could be onchange |
| 169 | 169 | * |
| 170 | - * @return mixed $output The output code to add to the form |
|
| 170 | + * @return string $output The output code to add to the form |
|
| 171 | 171 | */ |
| 172 | 172 | public static function form_input_select($name, $id, $content, $value = '', $option = '', $optionValue = ''){ |
| 173 | 173 | global $comboxOptionToHide; |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | * @param mixed $value The selected value for the field Default is empty |
| 216 | 216 | * @param string $option Allows to define options for the input Could be onchange |
| 217 | 217 | * |
| 218 | - * @return mixed $output The output code to add to the form |
|
| 218 | + * @return string $output The output code to add to the form |
|
| 219 | 219 | */ |
| 220 | 220 | public static function form_input_multiple_select($name, $id, $content, $value = array(), $option = '', $optionValue = '') { |
| 221 | 221 | global $comboxOptionToHide; |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | * @param mixed $value The selected value for the field Default is empty |
| 259 | 259 | * @param string $option Allows to define options for the input Could be onchange |
| 260 | 260 | * |
| 261 | - * @return mixed $output The output code to add to the form |
|
| 261 | + * @return string $output The output code to add to the form |
|
| 262 | 262 | */ |
| 263 | 263 | public static function form_input_check($name, $id, $content, $value = '', $type = 'checkbox', $option = '', $optionValue = '', $input_label=''){ |
| 264 | 264 | $output = ''; |
@@ -26,6 +26,7 @@ |
||
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * Add an error |
| 29 | + * @param string $error |
|
| 29 | 30 | */ |
| 30 | 31 | function add_error( $error ) { |
| 31 | 32 | $this->errors[] = $error; |