/
DisallowSpaceIndentUnitTest.inc
70 lines (60 loc) · 1.32 KB
/
DisallowSpaceIndentUnitTest.inc
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
class ExampleClass
{
function exampleFunction() {}
}
$o = <<<EOF
this is some text
this is some text
EOF;
$correctVar = false;
$correctVar = true;
// Indent with spaces is not allowed
$hello = array();
$world = '';
// here the indention is mixed with tabs and spaces
// [tab][space][space][space][tab]return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>";
return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>";
// [space][space][space][tab]return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>";
return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>";
// Doc comments are indent with tabs and one space
//[tab]/**
//[tab][space]*
/**
* CVS revision for HTTP headers.
*
* @var string
* @access private
*/
/**
*
*/
$str = 'hello
there';
/**
* This PHP DocBlock should be fine, even though there is a single space at the beginning.
*
* @var int $x
*/
$x = 1;
?>
<html>
<head>
<title>Foo</title>
</head>
<body>
<div>
<div>
<div>
</div>
</div>
</div>
</body>
</html>
<?php
// Issue #1404
// This is a line with mixed tabs and spaces.
echo 'And here is another line with mixed tabs and spaces.'
echo 'And another one.'
echo 'And another one.'
echo 'And another one.'