@@ -7,61 +7,61 @@ class Config
77 public readonly string $ copyright ;
88
99 /** @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 = './ ' ;
1818 public string $ language = 'en ' ;
19- public string $ fallback_language = 'en ' ;
19+ public string $ fallbackLanguage = 'en ' ;
2020 public int $ verbose = VERBOSE_DEFAULT ;
21- public string $ date_format = 'H:i:s ' ;
21+ public string $ dateFormat = 'H:i:s ' ;
2222 /** @var array<string> */
23- public array $ render_ids = [];
23+ public array $ renderIds = [];
2424 /** @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 = '' ;
2929 /** @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
3232 /** @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
3535 /** @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
3838 /** @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
4141 public string $ highlighter = 'phpdotnet \\phd \\Highlighter ' ;
4242 /** @var array<string> */
4343 public array $ package =['Generic ' ];
4444 /** @var array<string> $css */
4545 public array $ css = [];
46- public bool $ process_xincludes = false ;
46+ public bool $ processXincludes = false ;
4747 public ?string $ ext = null ;
4848 /** @var array<string> */
49- public array $ package_dirs = [__INSTALLDIR__ ];
50- public bool $ saveconfig = false ;
49+ public array $ packageDirs = [__INSTALLDIR__ ];
50+ public bool $ saveConfig = false ;
5151 public bool $ quit = false ;
52- public ?IndexRepository $ indexcache = null ;
53- public bool $ memoryindex = false ;
52+ public ?IndexRepository $ indexCache = null ;
53+ public bool $ memoryIndex = false ;
5454
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 = '' ;
5959
6060 public function __construct () {
6161 $ this ->copyright = 'Copyright(c) 2007- ' . \date ('Y ' ) . ' The PHP Documentation Group ' ;
6262
6363 if ('WIN ' === \strtoupper (\substr (\PHP_OS , 0 , 3 ))) {
64- $ this ->color_output = false ;
64+ $ this ->colorOutput = false ;
6565 }
6666 }
6767
@@ -98,7 +98,7 @@ public function getAllFiltered(): array {
9898 */
9999 public function getSupportedPackages (): array {
100100 $ packageList = [];
101- foreach ($ this ->package_dirs as $ dir ) {
101+ foreach ($ this ->packageDirs as $ dir ) {
102102 foreach (\glob ($ dir . "/phpdotnet/phd/Package/* " , \GLOB_ONLYDIR ) as $ item ) {
103103 $ baseitem = \basename ($ item );
104104 if ($ baseitem [0 ] !== '. ' ) {
@@ -112,30 +112,30 @@ public function getSupportedPackages(): array {
112112 /**
113113 * Returns whether terminal output supports colors
114114 */
115- public function getColor_output (): bool {
116- return $ this ->color_output ;
115+ public function getColorOutput (): bool {
116+ return $ this ->colorOutput ;
117117 }
118118
119119 /**
120120 * Enables/disables color output on the terminal
121121 */
122- public function setColor_output (bool $ color_output ): void {
122+ public function setColorOutput (bool $ colorOutput ): void {
123123 // 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 ;
127127 }
128- if (!posix_isatty ($ this ->phd_warning_output )) {
129- $ this ->phd_warning_color = false ;
128+ if (!posix_isatty ($ this ->phdWarningOutput )) {
129+ $ this ->phdWarningColor = false ;
130130 }
131- if (!posix_isatty ($ this ->php_error_output )) {
132- $ this ->php_error_color = false ;
131+ if (!posix_isatty ($ this ->phpErrorOutput )) {
132+ $ this ->phpErrorColor = false ;
133133 }
134- if (!posix_isatty ($ this ->user_error_output )) {
135- $ this ->user_error_color = false ;
134+ if (!posix_isatty ($ this ->userErrorOutput )) {
135+ $ this ->userErrorColor = false ;
136136 }
137137 }
138- $ this ->color_output = $ color_output ;
138+ $ this ->colorOutput = $ colorOutput ;
139139 }
140140
141141 /**
@@ -152,27 +152,27 @@ public function setColor_output(bool $color_output): void {
152152 * @return boolean True if indexing is required.
153153 */
154154 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 ' ;
157157 if (!\file_exists ($ indexfile )) {
158158 return true ;
159159 }
160160 }
161161
162- if ($ this ->no_index ) {
162+ if ($ this ->noIndex ) {
163163 return false ;
164164 }
165165
166- if ($ this ->force_index ) {
166+ if ($ this ->forceIndex ) {
167167 return true ;
168168 }
169169
170- if ($ this ->indexcache ->getIndexingTimeCount () === 0 ) {
170+ if ($ this ->indexCache ->getIndexingTimeCount () === 0 ) {
171171 return true ;
172172 }
173173
174- $ xmlLastModification = \filemtime ($ this ->xml_file );
175- if ($ this ->indexcache ->getIndexingTime () > $ xmlLastModification ) {
174+ $ xmlLastModification = \filemtime ($ this ->xmlFile );
175+ if ($ this ->indexCache ->getIndexingTime () > $ xmlLastModification ) {
176176 return false ;
177177 }
178178 return true ;
0 commit comments