1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* This file is part of phpDocumentor. |
4
|
|
|
* |
5
|
|
|
* For the full copyright and license information, please view the LICENSE |
6
|
|
|
* file that was distributed with this source code. |
7
|
|
|
* |
8
|
|
|
* @copyright 2010-2017 Mike van Riel<[email protected]> |
9
|
|
|
* @license http://www.opensource.org/licenses/mit-license.php MIT |
10
|
|
|
* @link http://phpdoc.org |
11
|
|
|
*/ |
12
|
|
|
|
13
|
|
|
namespace phpDocumentor\Configuration\Factory; |
14
|
|
|
|
15
|
|
|
use phpDocumentor\DomainModel\Dsn; |
16
|
|
|
use phpDocumentor\DomainModel\Path; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* Expected phpDocumentor2 configuration arrays used for unit testing. |
20
|
|
|
*/ |
21
|
|
|
final class Version2ExpectedArray |
22
|
|
|
{ |
23
|
|
|
/** |
24
|
|
|
* Provides the default phpDocumentor2 configuration array. |
25
|
|
|
* |
26
|
|
|
* @return array |
27
|
|
|
*/ |
28
|
|
|
public static function getDefaultArray() |
29
|
|
|
{ |
30
|
|
|
return [ |
31
|
|
|
'phpdocumentor' => [ |
32
|
|
|
'title' => 'my-doc', |
33
|
|
|
'use-cache' => true, |
34
|
|
|
'paths' => [ |
35
|
|
|
'output' => new \phpDocumentor\DomainModel\Dsn('build/docs'), |
36
|
|
|
'cache' => new \phpDocumentor\DomainModel\Path('/tmp/phpdoc-doc-cache'), |
37
|
|
|
], |
38
|
|
|
'versions' => [ |
39
|
|
|
'1.0.0' => [ |
40
|
|
|
'folder' => '', |
41
|
|
|
'api' => [ |
42
|
|
|
[ |
43
|
|
|
'format' => 'php', |
44
|
|
|
'source' => [ |
45
|
|
|
'dsn' => new Dsn('file://' . getcwd()), |
46
|
|
|
'paths' => [ |
47
|
|
|
0 => 'src', |
48
|
|
|
], |
49
|
|
|
], |
50
|
|
|
'ignore' => [ |
51
|
|
|
'hidden' => true, |
52
|
|
|
'symlinks' => true, |
53
|
|
|
'paths' => [], |
54
|
|
|
], |
55
|
|
|
'extensions' => [ |
56
|
|
|
0 => 'php', |
57
|
|
|
1 => 'php3', |
58
|
|
|
2 => 'phtml', |
59
|
|
|
], |
60
|
|
|
'visibility' => ['public'], |
61
|
|
|
'default-package-name' => 'Default', |
62
|
|
|
'markers' => [ |
63
|
|
|
0 => 'TODO', |
64
|
|
|
1 => 'FIXME', |
65
|
|
|
], |
66
|
|
|
'encoding' => 'utf8', |
67
|
|
|
'ignore-tags' => [], |
68
|
|
|
'validate' => false, |
69
|
|
|
], |
70
|
|
|
], |
71
|
|
|
], |
72
|
|
|
], |
73
|
|
|
'templates' => [ |
74
|
|
|
[ |
75
|
|
|
'name' => 'clean', |
76
|
|
|
], |
77
|
|
|
], |
78
|
|
|
], |
79
|
|
|
]; |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* Provides the phpDocumentor2 configuration array with multiple ignore paths. |
84
|
|
|
* |
85
|
|
|
* @return array |
86
|
|
|
*/ |
87
|
|
|
public static function getArrayWithMultipleIgnorePaths() |
88
|
|
|
{ |
89
|
|
|
return [ |
90
|
|
|
'phpdocumentor' => [ |
91
|
|
|
'title' => 'my-doc', |
92
|
|
|
'use-cache' => true, |
93
|
|
|
'paths' => [ |
94
|
|
|
'output' => new \phpDocumentor\DomainModel\Dsn('build/docs'), |
95
|
|
|
'cache' => new Path('/tmp/phpdoc-doc-cache'), |
96
|
|
|
], |
97
|
|
|
'versions' => [ |
98
|
|
|
'1.0.0' => [ |
99
|
|
|
'folder' => '', |
100
|
|
|
'api' => [ |
101
|
|
|
[ |
102
|
|
|
'format' => 'php', |
103
|
|
|
'source' => [ |
104
|
|
|
'dsn' => new Dsn('file://' . getcwd()), |
105
|
|
|
'paths' => [ |
106
|
|
|
0 => 'src', |
107
|
|
|
], |
108
|
|
|
], |
109
|
|
|
'ignore' => [ |
110
|
|
|
'hidden' => true, |
111
|
|
|
'symlinks' => true, |
112
|
|
|
'paths' => [ |
113
|
|
|
0 => 'vendor/*', |
114
|
|
|
1 => 'logs/*', |
115
|
|
|
], |
116
|
|
|
], |
117
|
|
|
'extensions' => [ |
118
|
|
|
0 => 'php', |
119
|
|
|
1 => 'php3', |
120
|
|
|
2 => 'phtml', |
121
|
|
|
], |
122
|
|
|
'visibility' => ['public'], |
123
|
|
|
'default-package-name' => 'Default', |
124
|
|
|
'markers' => [ |
125
|
|
|
0 => 'TODO', |
126
|
|
|
1 => 'FIXME', |
127
|
|
|
], |
128
|
|
|
'encoding' => 'utf8', |
129
|
|
|
'ignore-tags' => [], |
130
|
|
|
'validate' => false, |
131
|
|
|
], |
132
|
|
|
], |
133
|
|
|
], |
134
|
|
|
], |
135
|
|
|
'templates' => [ |
136
|
|
|
[ |
137
|
|
|
'name' => 'clean', |
138
|
|
|
], |
139
|
|
|
], |
140
|
|
|
], |
141
|
|
|
]; |
142
|
|
|
} |
143
|
|
|
} |
144
|
|
|
|