-
-
Notifications
You must be signed in to change notification settings - Fork 439
Expand file tree
/
Copy pathOption.php
More file actions
335 lines (276 loc) · 8.56 KB
/
Option.php
File metadata and controls
335 lines (276 loc) · 8.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<?php
declare(strict_types=1);
namespace Rector\Configuration;
use Rector\Caching\Contract\ValueObject\Storage\CacheStorageInterface;
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
final class Option
{
/**
* @var string
*/
public const SOURCE = 'source';
/**
* @var string
*/
public const AUTOLOAD_FILE = 'autoload-file';
/**
* @internal Use @see \Rector\Config\RectorConfig::bootstrapFiles() instead
* @var string
*/
public const BOOTSTRAP_FILES = 'bootstrap_files';
/**
* @var string
*/
public const DRY_RUN = 'dry-run';
/**
* @var string
*/
public const DRY_RUN_SHORT = 'n';
/**
* @var string
*/
public const OUTPUT_FORMAT = 'output-format';
/**
* @var string
*/
public const NO_PROGRESS_BAR = 'no-progress-bar';
/**
* @internal Use @see \Rector\Config\RectorConfig::phpVersion() instead
* @var string
*/
public const PHP_VERSION_FEATURES = 'php_version_features';
/**
* @internal Use @see \Rector\Config\RectorConfig::importNames() instead
* @var string
*/
public const AUTO_IMPORT_NAMES = 'auto_import_names';
/**
* @internal Use @see \Rector\Config\RectorConfig::polyfillPackages() instead
* @var string
*/
public const POLYFILL_PACKAGES = 'polyfill_packages';
/**
* @internal Use @see \Rector\Config\RectorConfig::importNames() instead
* @var string
*/
public const AUTO_IMPORT_DOC_BLOCK_NAMES = 'auto_import_doc_block_names';
/**
* @internal Use @see \Rector\Config\RectorConfig::importShortClasses() instead
* @var string
*/
public const IMPORT_SHORT_CLASSES = 'import_short_classes';
/**
* @internal Use @see \Rector\Config\RectorConfig::symfonyContainerXml() instead
* @var string
*/
public const SYMFONY_CONTAINER_XML_PATH_PARAMETER = 'symfony_container_xml_path';
/**
* @internal Use @see \Rector\Config\RectorConfig::symfonyContainerPhp()
* @var string
*/
public const SYMFONY_CONTAINER_PHP_PATH_PARAMETER = 'symfony_container_php_path';
/**
* @internal Use @see \Rector\Config\RectorConfig::newLineOnFluentCall()
* @var string
*/
public const NEW_LINE_ON_FLUENT_CALL = 'new_line_on_fluent_call';
/**
* @var string
*/
public const CLEAR_CACHE = 'clear-cache';
/**
* @var string
*/
public const ONLY = 'only';
/**
* @internal Use @see \Rector\Config\RectorConfig::parallel() instead
* @var string
*/
public const PARALLEL = 'parallel';
/**
* @internal Use @see \Rector\Config\RectorConfig::paths() instead
* @var string
*/
public const PATHS = 'paths';
/**
* @internal Use @see \Rector\Config\RectorConfig::autoloadPaths() instead
* @var string
*/
public const AUTOLOAD_PATHS = 'autoload_paths';
/**
* @internal Use @see \Rector\Config\RectorConfig::skip() instead
* @var string
*/
public const SKIP = 'skip';
/**
* @internal Use RectorConfig::fileExtensions() instead
* @var string
*/
public const FILE_EXTENSIONS = 'file_extensions';
/**
* @internal Use RectorConfig::cacheDirectory() instead
* @var string
*/
public const CACHE_DIR = 'cache_dir';
/**
* Cache backend. Most of the time we cache in files, but in ephemeral environment (e.g. CI), a faster `MemoryCacheStorage` can be useful.
* @internal Use RectorConfig::cacheClass() instead
*
* @var class-string<CacheStorageInterface>
* @internal
*/
public const CACHE_CLASS = FileCacheStorage::class;
/**
* @var string
*/
public const DEBUG = 'debug';
/**
* @var string
*/
public const XDEBUG = 'xdebug';
/**
* @var string
*/
public const CONFIG = 'config';
/**
* @internal Use @see \Rector\Config\RectorConfig::phpstanConfig() instead
* @var string
*/
public const PHPSTAN_FOR_RECTOR_PATHS = 'phpstan_for_rector_paths';
/**
* @var string
*/
public const NO_DIFFS = 'no-diffs';
/**
* @var string
*/
public const AUTOLOAD_FILE_SHORT = 'a';
/**
* @var string
*/
public const PARALLEL_IDENTIFIER = 'identifier';
/**
* @var string
*/
public const PARALLEL_PORT = 'port';
/**
* @internal Use @see \Rector\Config\RectorConfig::parallel() instead with pass int $jobSize parameter
* @var string
*/
public const PARALLEL_JOB_SIZE = 'parallel-job-size';
/**
* @internal Use @see \Rector\Config\RectorConfig::parallel() instead with pass int $maxNumberOfProcess parameter
* @var string
*/
public const PARALLEL_MAX_NUMBER_OF_PROCESSES = 'parallel-max-number-of-processes';
/**
* @internal Use @see \Rector\Config\RectorConfig::parallel() instead with pass int $seconds parameter
* @var string
*/
public const PARALLEL_JOB_TIMEOUT_IN_SECONDS = 'parallel-job-timeout-in-seconds';
/**
* @var string
*/
public const MEMORY_LIMIT = 'memory-limit';
/**
* @internal Use @see \Rector\Config\RectorConfig::indent() method
* @var string
*/
public const INDENT_CHAR = 'indent-char';
/**
* @internal Use @see \Rector\Config\RectorConfig::indent() method
* @var string
*/
public const INDENT_SIZE = 'indent-size';
/**
* @internal Use @see \Rector\Config\RectorConfig::removeUnusedImports() method
* @var string
*/
public const REMOVE_UNUSED_IMPORTS = 'remove-unused-imports';
/**
* @internal Use @see \Rector\Config\RectorConfig::containerCacheDirectory() method
* @var string
*/
public const CONTAINER_CACHE_DIRECTORY = 'container-cache-directory';
/**
* @internal For cache invalidation in case of change
* @var string
*/
public const REGISTERED_RECTOR_RULES = 'registered_rector_rules';
/**
* @internal For cache invalidation in case of change
* @var string
*/
public const REGISTERED_RECTOR_SETS = 'registered_rector_sets';
/**
* @internal For verify RectorConfigBuilder instance recreated
* @var string
*/
public const IS_RECTORCONFIG_BUILDER_RECREATED = 'is_rectorconfig_builder_recreated';
/**
* @internal For verify skipped rules exists in registered rules
* @var string
*/
public const SKIPPED_RECTOR_RULES = 'skipped_rector_rules';
/**
* @internal For collect skipped start with short open tag files to be reported
* @var string
*/
public const SKIPPED_START_WITH_SHORT_OPEN_TAG_FILES = 'skipped_start_with_short_open_tag_files';
/**
* @internal For reporting with absolute paths instead of relative paths (default behaviour)
* @see \Rector\Config\RectorConfig::reportingRealPath()
* @var string
*/
public const ABSOLUTE_FILE_PATH = 'absolute_file_path';
/**
* @internal To add editor links to console output
* @see \Rector\Config\RectorConfig::editorUrl()
* @var string
*/
public const EDITOR_URL = 'editor_url';
/**
* @internal Use @see \Rector\Config\RectorConfig::treatClassesAsFinal() method
* @var string
*/
public const TREAT_CLASSES_AS_FINAL = 'treat_classes_as_final';
/**
* @internal To report composer based loaded sets
* @see \Rector\Configuration\RectorConfigBuilder::withComposerBased()
* @var string
*/
public const COMPOSER_BASED_SETS = 'composer_based_sets';
/**
* @internal To filter files by specific suffix
*/
public const ONLY_SUFFIX = 'only-suffix';
/**
* @internal To report overflow levels in ->with*Level() methods
*/
public const LEVEL_OVERFLOWS = 'level_overflows';
/**
* @internal To avoid registering rules via ->withRules(), that are already loaded in sets,
* and keep rector.php clean
*/
public const ROOT_STANDALONE_REGISTERED_RULES = 'root_standalone_registered_rules';
/**
* @internal The other half of ROOT_STANDALONE_REGISTERED_RULES to compare
*/
public const SET_REGISTERED_RULES = 'set_registered_rules';
/**
* @internal to allow process file without extension if explicitly registered
*/
public const FILES_WITHOUT_EXTENSION = 'files_without_extension';
/**
* @experimental
*
* Limit changes to first X applied rules
*
* @var string
*/
public const KAIZEN = 'kaizen';
/**
* @var string
*/
public const INCLUDE_POST_RECTORS_IN_REPORTS = 'include_post_rectors_in_reports';
}