Completed
Push — develop ( 8eb671...133594 )
by Mike
19:30 queued 09:24
created

tests/data/NamespaceTestData.php (1 issue)

parameters are used.

Unused Code Minor

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-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
namespace foo;
17
18
use \ArrayObject;
19
20
// this is the same as use My\Full\NSname as NSname
21
use My\Full\Classname as Another;
22
23
// importing a global class
24
use My\Full\NSname;
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
    public function function1()
114
    {
115
    }
116
117
    /**
118
     * Only a single line.
119
     */
120
    public function function2()
121
    {
122
    }
123
124
    /**
125
     * Multiline short description
126
     * but intentionally did not end with a dot
127
     *
128
     * long description
129
     */
130
    public function function3()
131
    {
132
    }
133
134
    /**
135
     * Only a short description
136
     */
137
    public function function4()
138
    {
139
    }
140
141
    /**
142
     * Multiline short description
143
     * but intentionally did not @end with a dot and forgot extra newline
144
     * long @description
145
     *
146
     * @param string[] $test
147
     */
148
    public function function5($test)
0 ignored issues
show
The parameter $test 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...
149
    {
150
    }
151
}
152
153
/**
154
 * Separate test function.
155
 *
156
 * @param string[]|int[] $param
157
 */
158
function test(array $param)
159
{
160
}
161