This is a follow-up as the result of a patch review in #1818016-7: Make Breakpoint module pass Coder Review point 7). That addressed the following code in core's Breakpoint module:

/**
 * Import media queries from a theme or module and create a default group.
 *
...
 * @param string $sourceType
 *   Either Breakpoint::SOURCE_TYPE_THEME or Breakpoint::SOURCE_TYPE_MODULE.
...
 */
function _breakpoint_import_media_queries($group_name, $label, $source_type, $media_queries) {

As I stated in that review, these is an issue here with incomplete documentation of namespaced objects. See #1487760: [policy, no patch] Decide on documentation standards for namespaced items for more information. My understanding is that the correct explanation for that variable should be:

 *   Either \Drupal\breakpoint\Breakpoint::SOURCE_TYPE_THEME or
 *   \Drupal\breakpoint\Breakpoint::SOURCE_TYPE_MODULE.

Note the leading slash '\' as well. This was recently adopted as a standard so an explanation like 'A Drupal\node\Node object', which currently is a frequent occurence in core, should be flagged as well.

The purpose of this issue is create a sniff that will identify this type of inconsistency in the future.

Comments

klausi’s picture

Component: Code Sniffer » Coder Sniffer
Issue summary: View changes
Status: Active » Closed (won't fix)

Coder 7.x is frozen now and will not receive updates. Coder 8.x-2.x can be used to check code for any Drupal version, Coder 8.x-2.x also supports the phpcbf command to automatically fix conding standard errors. Please check if this issue is still relevant and reopen against that version if necessary.