5 |
aurelien |
1 |
<?php
|
|
|
2 |
/**
|
|
|
3 |
* PEAR_Sniffs_Files_LineLengthSniff.
|
|
|
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: LineLengthSniff.php,v 1.6 2007/07/27 05:36:23 squiz Exp $
|
|
|
14 |
* @link http://pear.php.net/package/PHP_CodeSniffer
|
|
|
15 |
*/
|
|
|
16 |
|
|
|
17 |
if (class_exists('Generic_Sniffs_Files_LineLengthSniff', true) === false) {
|
|
|
18 |
throw new PHP_CodeSniffer_Exception('Class Generic_Sniffs_Files_LineLengthSniff not found');
|
|
|
19 |
}
|
|
|
20 |
|
|
|
21 |
/**
|
|
|
22 |
* PEAR_Sniffs_Files_LineLengthSniff.
|
|
|
23 |
*
|
|
|
24 |
* Checks all lines in the file, and throws warnings if they are over 85
|
|
|
25 |
* characters in length.
|
|
|
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_Files_LineLengthSniff extends Generic_Sniffs_Files_LineLengthSniff
|
|
|
37 |
{
|
|
|
38 |
|
|
|
39 |
/**
|
|
|
40 |
* The limit that the length of a line should not exceed.
|
|
|
41 |
*
|
|
|
42 |
* @var int
|
|
|
43 |
*/
|
|
|
44 |
protected $lineLimit = 85;
|
|
|
45 |
|
|
|
46 |
/**
|
|
|
47 |
* The limit that the length of a line must not exceed.
|
|
|
48 |
*
|
|
|
49 |
* Set to zero (0) to disable.
|
|
|
50 |
*
|
|
|
51 |
* @var int
|
|
|
52 |
*/
|
|
|
53 |
protected $absoluteLineLimit = 0;
|
|
|
54 |
|
|
|
55 |
}//end class
|
|
|
56 |
|
|
|
57 |
?>
|