Completed
Push — develop ( 71fd61...bbac44 )
by Jaap
06:03 queued 02:27
created

tests/data/NamespaceTestData.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * phpDocumentor
4
 *
5
 * PHP Version 5
6
 *
7
 * @category   phpDocumentor
8
 * @package    Parser
9
 * @subpackage Tests
10
 * @author     Mike van Riel <[email protected]>
11
 * @copyright  2010-2011 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
namespace foo;
17
18
use My\Full\Classname as Another;
19
20
// this is the same as use My\Full\NSname as NSname
21
use My\Full\NSname;
22
23
// importing a global class
24
use \ArrayObject;
25
26
/**
27
 * Namespace test.
28
 *
29
 * @category   phpDocumentor
30
 * @package    Parser
31
 * @subpackage Tests
32
 * @author     Mike van Riel <[email protected]>
33
 * @license    http://www.opensource.org/licenses/mit-license.php MIT
34
 * @link       http://phpdoc.org
35
 */
36
class NamespaceTest
37
{
38
    /**
39
    * Expected type is foo\Classname
40
    *
41
    * @var Classname
42
    */
43
    public $singleNameClass = null;
44
45
    /**
46
    * Expected type is My\Full\Classname
47
    *
48
    * @var My\Full\Classname
49
    */
50
    public $namespacedClass = null;
51
52
    /**
53
    * Expected type is \ArrayObject
54
    *
55
    * @var \ArrayObject
56
    */
57
    public $globalClass = null;
58
59
    /**
60
    * Expected type is foo\Another
61
    *
62
    * @var namespace\Another
63
    */
64
    public $sameSpaceClassAnother = null;
65
66
    /**
67
    * Expected type is My\Full\Classname
68
    *
69
    * @var Another
70
    */
71
    public $aliasClassAnother = null;
72
73
    /**
74
    * Expected type is My\Full\NSname\subns
75
    *
76
    * @var NSname\subns
77
    */
78
    public $aliasSpaceNSname = null;
79
80
    /**
81
    * Expected type is \ArrayObject
82
    *
83
    * @var ArrayObject
84
    */
85
    public $aliasGlobalClass = null;
86
}
87
88
/**
89
 * Contains the test data for the phpDocumentor parser.
90
 *
91
 * This is a long description
92
 *
93
 * @category   phpDocumentor
94
 * @package    Parser
95
 * @subpackage Tests
96
 * @author     Mike van Riel <[email protected]>
97
 * @license    http://www.opensource.org/licenses/mit-license.php MIT
98
 * @link       http://phpdoc.org
99
 */
100
class DocBlocTest
101
{
102
    /** @var string $a */
103
    public $a = '';
104
105
    /**
106
    * This is a multi-line test where
107
    * we want to see if it works.
108
    *
109
    * We include a long description as well
110
    * that spans multiple lines.
111
    * {@link http://www.github.com/phpdocumentor/phpdocumentor2}
112
    *
113
    * @return void
114
    */
115
    public function function1()
116
    {
117
118
    }
119
120
    /**
121
    * Only a single line.
122
    *
123
    * @return void
124
    */
125
    public function function2()
126
    {
127
128
    }
129
130
    /**
131
    * Multiline short description
132
    * but intentionally did not end with a dot
133
    *
134
    * long description
135
    *
136
    * @return void
137
    */
138
    public function function3()
139
    {
140
141
    }
142
143
    /**
144
    * Only a short description
145
    */
146
    public function function4()
147
    {
148
149
    }
150
    /**
151
    * Multiline short description
152
    * but intentionally did not @end with a dot and forgot extra newline
153
    * long @description
154
    *
155
    * @param string[] $test
156
    *
157
    * @return void
158
    */
159
    public function function5($test)
160
    {
161
162
    }
163
}
164
165
/**
166
 * Separate test function.
167
 *
168
 * @param string[]|int[] $param
169
 *
170
 * @return void
171
 */
172
function test(array $param)
0 ignored issues
show
The parameter $param is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
173
{
174
}
175