File: LineLengthUnitTest.inc

package info (click to toggle)
php-codesniffer 1.3.4-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,092 kB
  • sloc: php: 30,445; xml: 3,768; makefile: 15; pascal: 8; sh: 6
file content (54 lines) | stat: -rw-r--r-- 1,858 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php

// This line is okay... just!
if (($reallyLongVarName === true) || (is_array($anotherLongVarName) == false)) {
    // Do something.
}

// This line is not okay... just!
if (($reallyLongVarName === true) || (is_array($anotherLongVarName) === false)) {
    // Do something.
}


// This line is is too long.
if (($anotherReallyLongVarName === true) || (is_array($anotherReallyLongVarName) === false)) {
    // Do something.
}

// This is a really really long comment that is going to go to exactly 80 chars.

// This is another really really long comment that is going to go well over 80 characters.

// And here is just a bunch of spaces that exceeds the line length.
                                                                                    

// And here are some spaces exactly 80 chars long.
                                                                                

// This is a really really really really long long comment that is going to go to exactly 100 chars.

// This is another really really really really really long comment that is going to go well over 100 characters.

// And here is just a bunch of spaces that exceeds the max line length.
                                                                                                           

// And here are some spaces exactly 100 chars long.
                                                                                                    
?>
<b>Hello</b>b>
<?php
echo 'hi';
?>

<?php
/**
 * Comments contining CVS IDs can be long, but should be ignored because
 * they cannot be changed by the developer. Same with license URLs.
 *
 * @license http://www.freebsd.org/copyright/freebsd-license.html BSD License (2 Clause)
 */
 ?>

<?php
// This is another really long comment that is going to go well over 100 characters, with no closing php tag after it.