Skip to content
Browse files

Revert "Delete" from 137c296. Restored the brace style sniff deactiva…

…tion the part the code base is unclear about.
  • Loading branch information...
1 parent 2fe2cb2 commit cf5a80218bca175a7e1a2e309309fd99f76fea2f @edorian edorian committed May 6, 2012
Showing with 23 additions and 0 deletions.
  1. +23 −0 build/PHPCS/Sniffs/ControlStructures/ControlSignatureSniff.php
View
23 build/PHPCS/Sniffs/ControlStructures/ControlSignatureSniff.php
@@ -0,0 +1,23 @@
+<?php
+class PHPCS_Sniffs_ControlStructures_ControlSignatureSniff extends PHP_CodeSniffer_Standards_AbstractPatternSniff
+{
+ public function __construct()
+ {
+ parent::__construct(true);
+ }
+
+ protected function getPatterns()
+ {
+ return array(
+ 'do {EOL...} while (...);EOL',
+ 'while (...) {EOL',
+ 'for (...) {EOL',
+ 'if (...) {EOL',
+ 'foreach (...) {EOL',
+ // Decide wether to use '}EOLelse' or '} else'
+ #'}EOLelse if (...) {EOL',
+ #'}EOLelse {EOL',
+ 'do {EOL',
+ );
+ }
+}

0 comments on commit cf5a802

Please sign in to comment.
Something went wrong with that request. Please try again.