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.3 |
||
6 | * |
||
7 | * @copyright 2010-2018 Mike van Riel / Naenius (http://www.naenius.com) |
||
8 | * @license http://www.opensource.org/licenses/mit-license.php MIT |
||
9 | * @link http://phpdoc.org |
||
10 | */ |
||
11 | |||
12 | namespace phpDocumentor; |
||
13 | |||
14 | use JMS\Serializer\Annotation as Serializer; |
||
15 | use phpDocumentor\Configuration\Logging; |
||
16 | use phpDocumentor\Configuration\Merger\Annotation as Merger; |
||
17 | use phpDocumentor\Partials\Partial; |
||
18 | use phpDocumentor\Plugin\Plugin; |
||
19 | use phpDocumentor\Transformer\Configuration\Transformations; |
||
20 | |||
21 | /** |
||
22 | * The definition for the configuration of phpDocumentor. |
||
23 | */ |
||
24 | class Configuration |
||
25 | { |
||
26 | /** |
||
27 | * @var string The title for the generated documentation. |
||
28 | * @Serializer\Type("string") |
||
29 | */ |
||
30 | protected $title = ''; |
||
31 | |||
32 | /** |
||
33 | * @var Parser\Configuration The settings used during the parsing phase. |
||
34 | * @Serializer\Type("phpDocumentor\Parser\Configuration") |
||
35 | */ |
||
36 | protected $parser; |
||
37 | |||
38 | /** |
||
39 | * @var Configuration\Logging The setting used for the logging of application messages and errors. |
||
40 | * @Serializer\Type("phpDocumentor\Configuration\Logging") |
||
41 | */ |
||
42 | protected $logging; |
||
43 | |||
44 | /** |
||
45 | * @var Transformer\Configuration The settings used during the transformation phase. |
||
46 | * @Serializer\Type("phpDocumentor\Transformer\Configuration") |
||
47 | */ |
||
48 | protected $transformer; |
||
49 | |||
50 | /** |
||
51 | * @var Parser\Configuration\Files contains a list of all files and directories to parse and to ignore. |
||
52 | * @Serializer\Type("phpDocumentor\Parser\Configuration\Files") |
||
53 | */ |
||
54 | protected $files; |
||
55 | |||
56 | /** |
||
57 | * @var Plugin[] contains a listing of all plugins that should be loaded during startup. |
||
58 | * @Serializer\Type("array<phpDocumentor\Plugin\Plugin>") |
||
59 | * @Serializer\XmlList(entry = "plugin") |
||
60 | * @Merger\Replace |
||
61 | */ |
||
62 | protected $plugins = []; |
||
63 | |||
64 | /** |
||
65 | * @var Transformations[] contains a list of all templates and custom transformations that are to be executed during |
||
66 | * the transformation process. |
||
67 | * @Serializer\Type("phpDocumentor\Transformer\Configuration\Transformations") |
||
68 | */ |
||
69 | protected $transformations; |
||
70 | |||
71 | /** |
||
72 | * @var Translator\Configuration The settings used during translation. |
||
73 | * @Serializer\Type("phpDocumentor\Translator\Configuration") |
||
74 | */ |
||
75 | protected $translator; |
||
76 | |||
77 | /** |
||
78 | * @var Partial[] A list of custom texts, or references thereto, that may be injected into templates. |
||
79 | * @Serializer\Type("array<phpDocumentor\Partials\Partial>") |
||
80 | */ |
||
81 | protected $partials = []; |
||
82 | |||
83 | /** |
||
84 | * Initializes all settings with their default values. |
||
85 | */ |
||
86 | 6 | public function __construct() |
|
87 | { |
||
88 | 6 | $this->transformer = new Transformer\Configuration(); |
|
89 | 6 | $this->transformations = new Transformer\Configuration\Transformations(); |
|
0 ignored issues
–
show
|
|||
90 | 6 | $this->files = new Parser\Configuration\Files(); |
|
91 | 6 | $this->parser = new Parser\Configuration(); |
|
92 | 6 | $this->logging = new Logging(); |
|
93 | 6 | $this->translator = new Translator\Configuration(); |
|
94 | 6 | } |
|
95 | |||
96 | /** |
||
97 | * Returns the title for the generated documentation. |
||
98 | * |
||
99 | * @return string |
||
100 | */ |
||
101 | 1 | public function getTitle() |
|
102 | { |
||
103 | 1 | return $this->title; |
|
104 | } |
||
105 | |||
106 | /** |
||
107 | * Returns the configuration related to which files are to be parsed. |
||
108 | * |
||
109 | * @return Parser\Configuration\Files |
||
110 | */ |
||
111 | 1 | public function getFiles() |
|
112 | { |
||
113 | 1 | return $this->files; |
|
114 | } |
||
115 | |||
116 | /** |
||
117 | * Returns the settings related to logging. |
||
118 | * |
||
119 | * @return Configuration\Logging |
||
120 | */ |
||
121 | 1 | public function getLogging() |
|
122 | { |
||
123 | 1 | return $this->logging; |
|
124 | } |
||
125 | |||
126 | /** |
||
127 | * Returns the configuration used by the parser. |
||
128 | * |
||
129 | * @return Parser\Configuration |
||
130 | */ |
||
131 | 1 | public function getParser() |
|
132 | { |
||
133 | 1 | return $this->parser; |
|
134 | } |
||
135 | |||
136 | /** |
||
137 | * Returns all partials that can be imported in the application. |
||
138 | * |
||
139 | * @return Partials\Partial[] |
||
140 | */ |
||
141 | 1 | public function getPartials() |
|
142 | { |
||
143 | 1 | return $this->partials; |
|
144 | } |
||
145 | |||
146 | /** |
||
147 | * Returns a list of all plugins that should be loaded by the application. |
||
148 | * |
||
149 | * @return Plugin[] |
||
150 | */ |
||
151 | 1 | public function getPlugins() |
|
152 | { |
||
153 | 1 | return $this->plugins; |
|
154 | } |
||
155 | |||
156 | /** |
||
157 | * Returns which templates and custom transformations need to be applied to the parsed data. |
||
158 | * |
||
159 | * @return Transformer\Configuration\Transformations |
||
160 | */ |
||
161 | 1 | public function getTransformations() |
|
162 | { |
||
163 | 1 | return $this->transformations; |
|
164 | } |
||
165 | |||
166 | /** |
||
167 | * Returns the settings for the transformer. |
||
168 | * |
||
169 | * @return Transformer\Configuration |
||
170 | */ |
||
171 | 1 | public function getTransformer() |
|
172 | { |
||
173 | 1 | return $this->transformer; |
|
174 | } |
||
175 | |||
176 | /** |
||
177 | * Returns the settings for the translator. |
||
178 | * |
||
179 | * @return Translator\Configuration |
||
180 | */ |
||
181 | 1 | public function getTranslator() |
|
182 | { |
||
183 | 1 | return $this->translator; |
|
184 | } |
||
185 | } |
||
186 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..