This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
lnkohana/vendor/phpunit/php-code-coverage/build/PHPCS/Sniffs/ControlStructures/ControlSignatureSniff.php

23 lines
530 B
PHP
Raw Permalink Normal View History

2013-04-22 04:09:50 +00:00
<?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',
'}EOLelse if (...) {EOL',
'}EOLelse {EOL',
'do {EOL',
);
}
}