The PHP doc comment syntax is incorrect, using @param variable Some Text
and @return Some Text
, when it should use @param type $variable Some Text
and @return type Some Text
(probably with new lines before "Some Text".
A specific example:
/**
* ...
*
* @param custom_tabs. An array representing custom tab contents, which will be
* appended to the Quicktabs instance from the database, or if no existing instance
* is being used, the custom tabs will be the entire contents. An example custom_tabs
* array would be array(array('title' => 'custom', 'contents' => array('#markup' =>
* t('Some markup'), 'weight' => 5));
*
* @return A render array that can be used as block content in hook_block_view
* (see quicktabs_block_view()), but can also just be added to the page array
* during hook_page_alter, or output anywhere else where it's sure to get
* passed through drupal_render().
*/
function quicktabs_build_quicktabs($name, $settings = array(), $custom_tabs = array()) {
Should be:
/**
* ...
*
* @param array $custom_tabs
* An array representing custom tab contents, which will be
* appended to the Quicktabs instance from the database, or if no existing instance
* is being used, the custom tabs will be the entire contents. An example custom_tabs
* array would be array(array('title' => 'custom', 'contents' => array('#markup' =>
* t('Some markup'), 'weight' => 5));
*
* @return array
* A render array that can be used as block content in hook_block_view
* (see quicktabs_block_view()), but can also just be added to the page array
* during hook_page_alter, or output anywhere else where it's sure to get
* passed through drupal_render().
*/
function quicktabs_build_quicktabs($name, array $settings = array(), array $custom_tabs = array()) {
With the way it currently is, for the above example phpcs gives the following type error: Expected type 'array'. Found 'void'.
Other comments make it past phpcs fine, but the comments are highlighted weird because the variables are missing the dollar signs (so they are highlighted as if they are types).