1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* phpDocumentor |
4
|
|
|
* |
5
|
|
|
* PHP Version 5 |
6
|
|
|
* |
7
|
|
|
* @category phpDocumentor |
8
|
|
|
* @package Transformer |
9
|
|
|
* @subpackage Unit_tests |
10
|
|
|
* @author Mike van Riel <[email protected]> |
11
|
|
|
* @copyright 2010-2018 Mike van Riel / Naenius (http://www.naenius.com) |
12
|
|
|
* @license http://www.opensource.org/licenses/mit-license.php MIT |
13
|
|
|
* @link http://phpdoc.org |
14
|
|
|
*/ |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Fixture file for different DocBlock tests. |
18
|
|
|
* |
19
|
|
|
* @category phpDocumentor |
20
|
|
|
* @package Transformer |
21
|
|
|
* @subpackage Unit_tests |
22
|
|
|
* @author Mike van Riel <[email protected]> |
23
|
|
|
* @license http://www.opensource.org/licenses/mit-license.php MIT |
24
|
|
|
* @link http://phpdoc.org |
25
|
|
|
*/ |
26
|
|
|
class phpDocumentor_Tests_Data_DocBlockFixture |
27
|
|
|
{ |
28
|
|
|
/* |
29
|
|
|
* The class docblock has two lines of short description AND the short description ends with a space. |
30
|
|
|
*/ |
31
|
|
|
|
32
|
|
|
public static function EmptyDocBlock(ArrayObject $object) |
|
|
|
|
33
|
|
|
{ |
34
|
|
|
// test a method with an empty docblock |
35
|
|
|
} |
36
|
|
|
|
37
|
|
|
public static function ReallyEmptyDocBlock(ArrayObject $object) |
|
|
|
|
38
|
|
|
{ |
39
|
|
|
// test a method with the smallest thinkable docblock |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* Single line docblock. |
44
|
|
|
*/ |
45
|
|
|
public static function SingleLineDocBlock(ArrayObject $object) |
|
|
|
|
46
|
|
|
{ |
47
|
|
|
// test a method with an empty docblock |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
/** Single line docblock. */ |
51
|
|
|
public static function SingleLineDocBlock2(ArrayObject $object) |
|
|
|
|
52
|
|
|
{ |
53
|
|
|
// test a method with an empty docblock |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* Single line docblock. |
58
|
|
|
* Long description. |
59
|
|
|
*/ |
60
|
|
|
public static function SimpleDocBlockWithLD(ArrayObject $object) |
|
|
|
|
61
|
|
|
{ |
62
|
|
|
// test a method with an empty docblock |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* This docblock is the ideal situation, short descriptions are single line and closed with a point. |
67
|
|
|
* |
68
|
|
|
* The long description is separated a whiteline away and has a trailing whiteline. After which each |
69
|
|
|
* tag 'group' is separated by a whiteline. |
70
|
|
|
* |
71
|
|
|
* @static |
72
|
|
|
* |
73
|
|
|
* @param ArrayObject $object Ideally. |
74
|
|
|
* |
75
|
|
|
* @return string |
76
|
|
|
*/ |
77
|
|
|
public static function IdealDocBlock(ArrayObject $object) |
|
|
|
|
78
|
|
|
{ |
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* This docblock is invalid because the short description 'does not end' |
83
|
|
|
* @static |
84
|
|
|
* @param ArrayObject $object |
85
|
|
|
* @return string |
86
|
|
|
*/ |
87
|
|
|
public static function DocBlockWithInvalidShortDescription($object) |
|
|
|
|
88
|
|
|
{ |
89
|
|
|
/* |
90
|
|
|
* This Docblock's short description does not end with a . or with a double space and thus |
91
|
|
|
* should be invalid. We allow it by noticing that there are tags following. |
92
|
|
|
*/ |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* This DocBlock tests whether the @link tag is correctly taken and shown. |
97
|
|
|
* |
98
|
|
|
* @link http://www.phpdoc.org |
99
|
|
|
*/ |
100
|
|
|
public static function DocBlockWithLinkTag() |
101
|
|
|
{ |
102
|
|
|
} |
103
|
|
|
|
104
|
|
|
/** |
105
|
|
|
* This tests whether a custom tag with hypen is interpreted |
106
|
|
|
* |
107
|
|
|
* @custom-tag This is a custom tag |
108
|
|
|
*/ |
109
|
|
|
public static function DocBlockWithTagWithHyphen() |
110
|
|
|
{ |
111
|
|
|
} |
112
|
|
|
|
113
|
|
|
/** |
114
|
|
|
* This docblock will contain an inline tag to test whether it still crashes. |
115
|
|
|
* |
116
|
|
|
* This is a test {@link} with an inline tag. |
117
|
|
|
* |
118
|
|
|
* @static |
119
|
|
|
*/ |
120
|
|
|
public static function DocBlockWithInlineTag() |
121
|
|
|
{ |
122
|
|
|
} |
123
|
|
|
} |
124
|
|
|
|
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.