forked from pfrenssen/coder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDocCommentUnitTest.inc.fixed
More file actions
152 lines (128 loc) · 2.94 KB
/
DocCommentUnitTest.inc.fixed
File metadata and controls
152 lines (128 loc) · 2.94 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?php
/**
* @file
* This doc comment ends in a dot, but has some white space after it.
*/
/**
* Separate @param, @return, @throws sections by a blank line.
*
* @param string $param
* Something incredibly useful.
*
* @return bool
* Returns FALSE.
*
* @throws \Exception
* Thrown when $param is TRUE.
*
* @ingroup sniffer
* @deprecated
* @see some_function()
* @todo Fix coding standards.
*/
function test7($param) {
if ($param) {
throw new Exception();
}
return FALSE;
}
/**
* No space before the short description.
*/
function test8() {
}
/**
* Starting lower case and no dot at the end.
*/
function test9() {
}
/**
* Short description ok.
*
* Long description starting lower case.
*/
function test10() {
}
/**
*
*/
class Test {
/**
* No newline required between tag groups except @param, @return, @throws.
*
* @see some_function()
* @todo Fix coding standards.
*/
public function test() {
}
}
/**
* Short description.
*
* Long description without full stop.
*/
function test11() {
}
/**
* Long description will start with a number below.
*
* 64KB ought to be enough for anybody.
*/
function test12() {
}
/**
* Creates an organisation with data provided in a table.
*
* Table format:
* phpcs:disable
* | name | chairman | founder | founding year | motto |
* | City Watch | Sir Samuel Vimes | King Veltrick I | 1561 UC | Fabricati Diem, Pvncti Agvnt Celeriter |
* | Assassin's Guild | Lord Downey | Sir Gyles de Munforte | 1512 AM | Nil Mortifi, Sine Lvcre |
* | Unseen University | Mustrum Ridcully | Alberto Malich the Wise | 1281 AM | Nvnc Id Vides, Nvnc Ne Vides |
* phpcs:enable
*
* @param \TableNode $organisation_table
* The organisation data.
*
* @Given (the following )organisations:
*/
function givenOrganisations(TableNode $organisation_table) {
}
/**
* +
* This has a typo after the comment start.
*/
function test13() {
}
/**
* Some short comment.
*
* @param array $matches
* An array of matches by a preg_replace_callback() call that scans for
* @import-ed CSS files, except for external CSS files.
* @param array $sub_key
* An array containing the sub-keys specifying the library asset, e.g.
* @code['js']@endcode or @code['css', 'component']@endcode
* @param string $to
* The email address or addresses where the message will be sent to. The
* formatting of this string will be validated with the
* @link http://php.net/manual/filter.filters.validate.php PHP email @endlink.
*/
function test14(array $matches, array $sub_key, $to) {
}
/**
* {@inheritdoc}
*/
function test15_lower_case_inheritdoc();
/**
* {@inheritDoc}
*/
function test15_camel_case_inheritdoc();
/**
* {@inheritdoc}
*/
function test16_lower_case_fail_needs_braces();
/**
* {@inheritDoc}
*/
function test17_camel_case_fail_needs_braces();