You are here

protected function Drupal_Sniffs_ControlStructures_ControlSignatureSniff::getPatterns in Coder 7.2

Returns the patterns that this test wishes to verify.

Return value

array(string)

File

coder_sniffer/Drupal/Sniffs/ControlStructures/ControlSignatureSniff.php, line 51

Class

Drupal_Sniffs_ControlStructures_ControlSignatureSniff
Verifies that control statements conform to their coding standards.

Code

protected function getPatterns() {
  return array(
    'do {EOL...} while (...);EOL',
    'while (...) {EOL',
    'switch (...) {EOL',
    'for (...) {EOL',
    'if (...) {EOL',
    'foreach (...) {EOL',
    // The EOL preceding the else/elseif keywords is not detected
    // correctly, so we have
    // Drupal_Sniffs_ControlStructures_ElseNewlineSniff to
    // cover that.
    'elseif (...) {EOL',
    'else {EOL',
    'do {EOL',
  );
}