@@ -7,61 +7,61 @@ class Config
7
7
public readonly string $ copyright ;
8
8
9
9
/** @var array<string, string> */
10
- public array $ output_format = [];
11
- public bool $ no_index = false ;
12
- public bool $ force_index = false ;
13
- public bool $ no_toc = false ;
14
- public string $ xml_root = '. ' ;
15
- public string $ xml_file = './.manual.xml ' ;
16
- public string $ history_file = './fileModHistory.php ' ;
17
- public string $ lang_dir = './ ' ;
10
+ public array $ outputFormat = [];
11
+ public bool $ noIndex = false ;
12
+ public bool $ forceIndex = false ;
13
+ public bool $ noToc = false ;
14
+ public string $ xmlRoot = '. ' ;
15
+ public string $ xmlFile = './.manual.xml ' ;
16
+ public string $ historyFile = './fileModHistory.php ' ;
17
+ public string $ langDir = './ ' ;
18
18
public string $ language = 'en ' ;
19
- public string $ fallback_language = 'en ' ;
19
+ public string $ fallbackLanguage = 'en ' ;
20
20
public int $ verbose = VERBOSE_DEFAULT ;
21
- public string $ date_format = 'H:i:s ' ;
21
+ public string $ dateFormat = 'H:i:s ' ;
22
22
/** @var array<string> */
23
- public array $ render_ids = [];
23
+ public array $ renderIds = [];
24
24
/** @var array<string> */
25
- public array $ skip_ids = [];
26
- private bool $ color_output = true ;
27
- public string $ output_dir = './output/ ' ;
28
- public string $ output_filename = '' ;
25
+ public array $ skipIds = [];
26
+ private bool $ colorOutput = true ;
27
+ public string $ outputDir = './output/ ' ;
28
+ public string $ outputFilename = '' ;
29
29
/** @var resource */
30
- public $ php_error_output = \STDERR ;
31
- public string $ php_error_color = '01;31 ' ; // Red
30
+ public $ phpErrorOutput = \STDERR ;
31
+ public string $ phpErrorColor = '01;31 ' ; // Red
32
32
/** @var resource */
33
- public $ user_error_output = \STDERR ;
34
- public string $ user_error_color = '01;33 ' ; // Yellow
33
+ public $ userErrorOutput = \STDERR ;
34
+ public string $ userErrorColor = '01;33 ' ; // Yellow
35
35
/** @var resource */
36
- public $ phd_info_output = \STDOUT ;
37
- public string $ phd_info_color = '01;32 ' ; // Green
36
+ public $ phdInfoOutput = \STDOUT ;
37
+ public string $ phdInfoColor = '01;32 ' ; // Green
38
38
/** @var resource */
39
- public $ phd_warning_output = \STDOUT ;
40
- public string $ phd_warning_color = '01;35 ' ; // Magenta
39
+ public $ phdWarningOutput = \STDOUT ;
40
+ public string $ phdWarningColor = '01;35 ' ; // Magenta
41
41
public string $ highlighter = 'phpdotnet \\phd \\Highlighter ' ;
42
42
/** @var array<string> */
43
43
public array $ package =['Generic ' ];
44
44
/** @var array<string> $css */
45
45
public array $ css = [];
46
- public bool $ process_xincludes = false ;
46
+ public bool $ processXincludes = false ;
47
47
public ?string $ ext = null ;
48
48
/** @var array<string> */
49
- public array $ package_dirs = [__INSTALLDIR__ ];
50
- public bool $ saveconfig = false ;
49
+ public array $ packageDirs = [__INSTALLDIR__ ];
50
+ public bool $ saveConfig = false ;
51
51
public bool $ quit = false ;
52
- public ?IndexRepository $ indexcache = null ;
53
- public bool $ memoryindex = false ;
52
+ public ?IndexRepository $ indexCache = null ;
53
+ public bool $ memoryIndex = false ;
54
54
55
- public string $ phpweb_version_filename = '' ;
56
- public string $ phpweb_acronym_filename = '' ;
57
- public string $ phpweb_sources_filename = '' ;
58
- public string $ phpweb_history_filename = '' ;
55
+ public string $ phpwebVersionFilename = '' ;
56
+ public string $ phpwebAcronymFilename = '' ;
57
+ public string $ phpwebSourcesFilename = '' ;
58
+ public string $ phpwebHistoryFilename = '' ;
59
59
60
60
public function __construct () {
61
61
$ this ->copyright = 'Copyright(c) 2007- ' . \date ('Y ' ) . ' The PHP Documentation Group ' ;
62
62
63
63
if ('WIN ' === \strtoupper (\substr (\PHP_OS , 0 , 3 ))) {
64
- $ this ->color_output = false ;
64
+ $ this ->colorOutput = false ;
65
65
}
66
66
}
67
67
@@ -98,7 +98,7 @@ public function getAllFiltered(): array {
98
98
*/
99
99
public function getSupportedPackages (): array {
100
100
$ packageList = [];
101
- foreach ($ this ->package_dirs as $ dir ) {
101
+ foreach ($ this ->packageDirs as $ dir ) {
102
102
foreach (\glob ($ dir . "/phpdotnet/phd/Package/* " , \GLOB_ONLYDIR ) as $ item ) {
103
103
$ baseitem = \basename ($ item );
104
104
if ($ baseitem [0 ] !== '. ' ) {
@@ -112,30 +112,30 @@ public function getSupportedPackages(): array {
112
112
/**
113
113
* Returns whether terminal output supports colors
114
114
*/
115
- public function getColor_output (): bool {
116
- return $ this ->color_output ;
115
+ public function getColorOutput (): bool {
116
+ return $ this ->colorOutput ;
117
117
}
118
118
119
119
/**
120
120
* Enables/disables color output on the terminal
121
121
*/
122
- public function setColor_output (bool $ color_output ): void {
122
+ public function setColorOutput (bool $ colorOutput ): void {
123
123
// Disable colored output if the terminal doesn't support colors
124
- if ($ color_output && function_exists ('posix_isatty ' )) {
125
- if (!posix_isatty ($ this ->phd_info_output )) {
126
- $ this ->phd_info_color = false ;
124
+ if ($ colorOutput && function_exists ('posix_isatty ' )) {
125
+ if (!posix_isatty ($ this ->phdInfoOutput )) {
126
+ $ this ->phdInfoColor = false ;
127
127
}
128
- if (!posix_isatty ($ this ->phd_warning_output )) {
129
- $ this ->phd_warning_color = false ;
128
+ if (!posix_isatty ($ this ->phdWarningOutput )) {
129
+ $ this ->phdWarningColor = false ;
130
130
}
131
- if (!posix_isatty ($ this ->php_error_output )) {
132
- $ this ->php_error_color = false ;
131
+ if (!posix_isatty ($ this ->phpErrorOutput )) {
132
+ $ this ->phpErrorColor = false ;
133
133
}
134
- if (!posix_isatty ($ this ->user_error_output )) {
135
- $ this ->user_error_color = false ;
134
+ if (!posix_isatty ($ this ->userErrorOutput )) {
135
+ $ this ->userErrorColor = false ;
136
136
}
137
137
}
138
- $ this ->color_output = $ color_output ;
138
+ $ this ->colorOutput = $ colorOutput ;
139
139
}
140
140
141
141
/**
@@ -152,27 +152,27 @@ public function setColor_output(bool $color_output): void {
152
152
* @return boolean True if indexing is required.
153
153
*/
154
154
public function requiresIndexing (): bool {
155
- if (! $ this ->indexcache ) {
156
- $ indexfile = $ this ->output_dir . 'index.sqlite ' ;
155
+ if (! $ this ->indexCache ) {
156
+ $ indexfile = $ this ->outputDir . 'index.sqlite ' ;
157
157
if (!\file_exists ($ indexfile )) {
158
158
return true ;
159
159
}
160
160
}
161
161
162
- if ($ this ->no_index ) {
162
+ if ($ this ->noIndex ) {
163
163
return false ;
164
164
}
165
165
166
- if ($ this ->force_index ) {
166
+ if ($ this ->forceIndex ) {
167
167
return true ;
168
168
}
169
169
170
- if ($ this ->indexcache ->getIndexingTimeCount () === 0 ) {
170
+ if ($ this ->indexCache ->getIndexingTimeCount () === 0 ) {
171
171
return true ;
172
172
}
173
173
174
- $ xmlLastModification = \filemtime ($ this ->xml_file );
175
- if ($ this ->indexcache ->getIndexingTime () > $ xmlLastModification ) {
174
+ $ xmlLastModification = \filemtime ($ this ->xmlFile );
175
+ if ($ this ->indexCache ->getIndexingTime () > $ xmlLastModification ) {
176
176
return false ;
177
177
}
178
178
return true ;
0 commit comments