Subversion Repositories Applications.framework

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5 aurelien 1
<?php
2
 
3
// Brace should be on new line.
4
function myFunction() {
5
}
6
 
7
// Good.
8
function myFunction()
9
{
10
}
11
 
12
// Too many spaces.
13
function myFunction()   {
14
}
15
 
16
// Too many newlines.
17
function myFunction()
18
 
19
{
20
}
21
 
22
// Space before brace.
23
function myFunction()
24
 {
25
}
26
 
27
class myClass()
28
{
29
    // Brace should be on new line.
30
    function myFunction() {
31
    }
32
 
33
    // Good.
34
    function myFunction()
35
    {
36
    }
37
 
38
    // No aligned correctly.
39
    function myFunction()
40
{
41
}
42
 
43
    // Too many spaces.
44
    function myFunction()   {
45
    }
46
 
47
    // Too many newlines.
48
    function myFunction()
49
 
50
    {
51
    }
52
 
53
    // Space before brace.
54
    function myFunction()
55
     {
56
    }
57
}
58
 
59
 
60
 
61
/* Multi-line declarations */
62
 
63
 
64
 
65
// Brace should be on new line.
66
function myFunction($variable1, $variable2,
67
    $variable3, $variable4) {
68
}
69
 
70
// Good.
71
function myFunction($variable1, $variable2,
72
    $variable3, $variable4)
73
{
74
}
75
 
76
// Too many spaces.
77
function myFunction($variable1, $variable2,
78
    $variable3, $variable4)   {
79
}
80
 
81
// Too many newlines.
82
function myFunction($variable1, $variable2,
83
    $variable3, $variable4)
84
 
85
{
86
}
87
 
88
// Space before brace.
89
function myFunction($variable1, $variable2,
90
    $variable3, $variable4)
91
 {
92
}
93
 
94
class myClass()
95
{
96
    // Brace should be on new line.
97
    function myFunction($variable1, $variable2,
98
    $variable3, $variable4) {
99
    }
100
 
101
    // Good.
102
    function myFunction($variable1, $variable2,
103
    $variable3, $variable4)
104
    {
105
    }
106
 
107
    // No aligned correctly.
108
    function myFunction($variable1, $variable2,
109
    $variable3, $variable4)
110
{
111
}
112
 
113
    // Too many spaces.
114
    function myFunction($variable1, $variable2,
115
    $variable3, $variable4)   {
116
    }
117
 
118
    // Too many newlines.
119
    function myFunction($variable1, $variable2,
120
    $variable3, $variable4)
121
 
122
    {
123
    }
124
 
125
    // Space before brace.
126
    function myFunction($variable1, $variable2,
127
    $variable3, $variable4)
128
     {
129
    }
130
}
131
 
132
interface MyInterface()
133
{
134
    function myFunction();
135
}
136
 
137
function myFunction(
138
                    $arg1,
139
                    $arg2,
140
                    $arg3,
141
                    $arg4,
142
                    $arg5,
143
                    $arg6
144
                    )
145
{
146
}
147
 
148
function myFunction(
149
                    $arg1,
150
                    $arg2,
151
                    $arg3,
152
                    $arg4,
153
                    $arg5,
154
                    $arg6
155
                    ) {
156
}
157
?>