public static function Drupal_Sniffs_Semantics_FunctionCallSniff::registerListener in Coder 7.2
Registers a listener object so that it will be called during processing.
Parameters
Drupal_Sniffs_Semantics_FunctionCall $listener: The listener object that should be notified.
Return value
void
1 call to Drupal_Sniffs_Semantics_FunctionCallSniff::registerListener()
- Drupal_Sniffs_Semantics_FunctionCall::register in coder_sniffer/
Drupal/ Sniffs/ Semantics/ FunctionCall.php - Returns an array of tokens this test wants to listen for.
File
- coder_sniffer/
Drupal/ Sniffs/ Semantics/ FunctionCallSniff.php, line 240
Class
- Drupal_Sniffs_Semantics_FunctionCallSniff
- Helper class to sniff for specific function calls.
Code
public static function registerListener($listener) {
$funtionNames = $listener
->registerFunctionNames();
foreach ($funtionNames as $name) {
self::$listeners[$name][] = $listener;
}
}