5 |
aurelien |
1 |
<?php
|
|
|
2 |
/**
|
|
|
3 |
* PEAR_Sniffs_ControlStructures_InlineControlStructureSniff.
|
|
|
4 |
*
|
|
|
5 |
* PHP version 5
|
|
|
6 |
*
|
|
|
7 |
* @category PHP
|
|
|
8 |
* @package PHP_CodeSniffer
|
|
|
9 |
* @author Greg Sherwood <gsherwood@squiz.net>
|
|
|
10 |
* @author Marc McIntyre <mmcintyre@squiz.net>
|
|
|
11 |
* @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600)
|
|
|
12 |
* @license http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
|
|
|
13 |
* @version CVS: $Id: InlineControlStructureSniff.php,v 1.1 2008/05/01 00:49:32 squiz Exp $
|
|
|
14 |
* @link http://pear.php.net/package/PHP_CodeSniffer
|
|
|
15 |
*/
|
|
|
16 |
|
|
|
17 |
if (class_exists('Generic_Sniffs_ControlStructures_InlineControlStructureSniff', true) === false) {
|
|
|
18 |
$error = 'Class Generic_Sniffs_ControlStructures_InlineControlStructureSniff not found';
|
|
|
19 |
throw new PHP_CodeSniffer_Exception($error);
|
|
|
20 |
}
|
|
|
21 |
|
|
|
22 |
/**
|
|
|
23 |
* PEAR_Sniffs_ControlStructures_InlineControlStructureSniff.
|
|
|
24 |
*
|
|
|
25 |
* Verifies that inline control statements are not present.
|
|
|
26 |
*
|
|
|
27 |
* @category PHP
|
|
|
28 |
* @package PHP_CodeSniffer
|
|
|
29 |
* @author Greg Sherwood <gsherwood@squiz.net>
|
|
|
30 |
* @author Marc McIntyre <mmcintyre@squiz.net>
|
|
|
31 |
* @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600)
|
|
|
32 |
* @license http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
|
|
|
33 |
* @version Release: 1.2.0RC1
|
|
|
34 |
* @link http://pear.php.net/package/PHP_CodeSniffer
|
|
|
35 |
*/
|
|
|
36 |
class PEAR_Sniffs_ControlStructures_InlineControlStructureSniff extends Generic_Sniffs_ControlStructures_InlineControlStructureSniff
|
|
|
37 |
{
|
|
|
38 |
|
|
|
39 |
/**
|
|
|
40 |
* If true, an error will be thrown; otherwise a warning.
|
|
|
41 |
*
|
|
|
42 |
* @var bool
|
|
|
43 |
*/
|
|
|
44 |
protected $error = false;
|
|
|
45 |
|
|
|
46 |
}//end class
|
|
|
47 |
|
|
|
48 |
?>
|