~ubuntu-branches/ubuntu/utopic/php-codesniffer/utopic-proposed

« back to all changes in this revision

Viewing changes to PHP_CodeSniffer-1.5.3/CodeSniffer/Standards/Generic/Tests/Files/LineLengthUnitTest.inc

  • Committer: Package Import Robot
  • Author(s): David Prévot
  • Date: 2014-07-21 14:42:41 UTC
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: package-import@ubuntu.com-20140721144241-t0v9knmgtzftbsw6
Tags: upstream-1.5.3
Import upstream version 1.5.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
// This line is okay... just!
 
4
if (($reallyLongVarName === true) || (is_array($anotherLongVarName) == false)) {
 
5
    // Do something.
 
6
}
 
7
 
 
8
// This line is not okay... just!
 
9
if (($reallyLongVarName === true) || (is_array($anotherLongVarName) === false)) {
 
10
    // Do something.
 
11
}
 
12
 
 
13
 
 
14
// This line is is too long.
 
15
if (($anotherReallyLongVarName === true) || (is_array($anotherReallyLongVarName) === false)) {
 
16
    // Do something.
 
17
}
 
18
 
 
19
// This is a really really long comment that is going to go to exactly 80 chars.
 
20
 
 
21
// This is another really really long comment that is going to go well over 80 characters.
 
22
 
 
23
// And here is just a bunch of spaces that exceeds the line length.
 
24
                                                                                    
 
25
 
 
26
// And here are some spaces exactly 80 chars long.
 
27
                                                                                
 
28
 
 
29
// This is a really really really really long long comment that is going to go to exactly 100 chars.
 
30
 
 
31
// This is another really really really really really long comment that is going to go well over 100 characters.
 
32
 
 
33
// And here is just a bunch of spaces that exceeds the max line length.
 
34
                                                                                                           
 
35
 
 
36
// And here are some spaces exactly 100 chars long.
 
37
                                                                                                    
 
38
?>
 
39
<b>Hello</b>b>
 
40
<?php
 
41
echo 'hi';
 
42
?>
 
43
 
 
44
<?php
 
45
/**
 
46
 * Comments contining CVS IDs can be long, but should be ignored because
 
47
 * they cannot be changed by the developer. Same with license URLs. Also
 
48
 * and URL/HeadURL in subversion.
 
49
 *
 
50
 * @license http://www.freebsd.org/copyright/freebsd-license.html BSD License (2 Clause)
 
51
 *
 
52
 * $URL: file/paths/in/subversion/are/prefixed/by/URL/or/HeadURL/and/can/be/very/long/especially/if/they/are/in/a/branch $
 
53
 * $HeadURL: https://svn.example.org/file/paths/in/subversion/are/prefixed/by/URL/or/HeadURL/and/can/be/very/long/especially/if/they/are/in/a/branch $
 
54
 */
 
55
 
 
56
// $URL: file/paths/in/subversion/are/prefixed/by/URL/or/HeadURL/and/can/be/very/long/especially/if/they/are/in/a/branch $
 
57
// $HeadURL: https://svn.example.org/file/paths/in/subversion/are/prefixed/by/URL/or/HeadURL/and/can/be/very/long/especially/if/they/are/in/a/branch $
 
58
 
 
59
echo '$URL: file/paths/in/subversion/are/prefixed/by/URL/or/HeadURL/and/can/be/very/long/especially/if/they/are/in/a/branch $';
 
60
echo '$HeadURL: https://svn.example.org/file/paths/in/subversion/are/prefixed/by/URL/or/HeadURL/and/can/be/very/long/especially/if/they/are/in/a/branch $'
 
61
 
 
62
 ?>
 
63
 
 
64
    * $URL: file/paths/in/subversion/are/prefixed/by/URL/or/HeadURL/and/can/be/very/long/especially/if/they/are/in/a/branch $
 
65
    * $HeadURL: https://svn.example.org/file/paths/in/subversion/are/prefixed/by/URL/or/HeadURL/and/can/be/very/long/especially/if/they/are/in/a/branch $
 
66
 
 
67
<?php
 
68
// This is another really long comment that is going to go well over 100 characters, with no closing php tag after it.