-
Notifications
You must be signed in to change notification settings - Fork 0
/
filterTest.php
159 lines (139 loc) · 2.97 KB
/
filterTest.php
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
153
154
155
156
157
158
159
<?php
// this code is purposefully trash to fuzz the input filter as much as possible.
namespace My\Name\Space;
/**
* @immutable
* expect: @xrefitem immutable "Immutable" "Immutable Objects" ^^^default description^^^
*
* @immutable foo bar
* expect: @xrefitem immutable "Immutable" "Immutable Objects" foo bar
*/
interface I {
}
/**
* @see https://example.com
* expect: @see https://example.com
*
* @see https://example.com?asd&123#fooBar Foo Bar
* expect: @see [Foo Bar](https://example.com?asd&123#fooBar)
*
* expect: abstract class Z {
*/
trait Z {
/**
* expect: public function foo() {
*/
public function foo () {
}
}
/**
* expect: abstract class ZZ extends Z {
*/
trait ZZ {
use Z;
}
/**
* a class named Y
*
*
* expect: abstract class Y extends Z implements I {
*/
abstract class Y
implements I {
use Z;
/**
* expect: abstract public int function A();
*/
abstract public function A (): int;
}
/**
* A class named X.
*
* @property string $foo @see bar() here's a tag within a tag.
* expect: @see bar() here's a tag within a tag.
* Access `foo`
* a multiline
* comment for $foo
* with preserved indentation
* - like so
* - and so
* @method $this bar(int $bar) Sets `bar`
* a multiline
* comment for bar
* @method static static baz(int $baz) This is
* a multiline
* comment for baz.
* with preserved indentation
* - like so
* - and so
*
* @depends some text
* expect: some text
*
* @uses some text
* expect: @see some text
*
* @used-by some text
* expect: @see some text
*
* expect: final class X extends Y, ZZ implements I {
* expect: magic public static self baz(int $baz);
* expect: magic public $this bar(int $bar);
* expect: magic public string $foo;
*/
final class X
extends Y
implements I {
use ZZ {
foo as bar; // this shouldn't mess up the use statement;
}
/**
* Fizz.
*
* @var $this |that[] Some text.
*
* expect: protected static $this $fizz;
*/
protected static $fizz;
/**
* @return null|static[] Some text.
*
* expect: final public static null|self[] function B() {
*/
final public static function B () {
return null;
}
/**
* @inheritDoc
* @return $this|null
*
* expect: public $this|null function A() {
*/
public function A (): int {
return null;
}
/**
* @return string
*
* expect: public string function __toString() {
*/
public function __toString (): string {
return '';
}
/**
* Some text
*
* @internal
*
* expect: internal void function _hidden() {
*/
public function _hidden (): void {
}
// expect: no docblock
// expect: public void function doNothing (/* ::hello */) {
/**
* @inheritDoc
*/
public function doNothing (/* ::hello */): void {
}
}