Skip to content

Commit b80ae36

Browse files
hasziGirgias
authored andcommitted
Change property names to camel case
1 parent e66f34e commit b80ae36

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+288
-288
lines changed

phpdotnet/phd/Config.php

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -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;

phpdotnet/phd/Format.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ abstract class Format extends ObjectStorage
6868
public function __construct(Config $config, OutputHandler $outputHandler) {
6969
$this->config = $config;
7070
$this->outputHandler = $outputHandler;
71-
if ($this->config->indexcache) {
72-
$this->indexRepository = $this->config->indexcache;
71+
if ($this->config->indexCache) {
72+
$this->indexRepository = $this->config->indexCache;
7373
if (!($this instanceof Index)) {
7474
$this->sortIDs();
7575
}
@@ -337,13 +337,13 @@ final public function autogen($text, $lang = null) {
337337
if (isset($this->autogen[$lang][$text])) {
338338
return $this->autogen[$lang][$text];
339339
}
340-
if ($lang == $this->config->fallback_language) {
340+
if ($lang == $this->config->fallbackLanguage) {
341341
throw new \InvalidArgumentException("Cannot autogenerate text for '$text'");
342342
}
343-
return $this->autogen($text, $this->config->fallback_language);
343+
return $this->autogen($text, $this->config->fallbackLanguage);
344344
}
345345

346-
$filename = $this->config->lang_dir . $lang . ".ini";
346+
$filename = $this->config->langDir . $lang . ".ini";
347347

348348
if (!file_exists($filename) && strncmp(basename($filename), 'doc-', 4) === 0) {
349349
$filename = dirname($filename) . DIRECTORY_SEPARATOR . substr(basename($filename), 4);

phpdotnet/phd/Format/Abstract/XHTML.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ public function CDATA($value) {
7171
* @return void
7272
*/
7373
public function postConstruct() {
74-
$this->mediamanager = new MediaManager($this->config->xml_root);
74+
$this->mediamanager = new MediaManager($this->config->xmlRoot);
7575
$outputdir = $this->getOutputDir();
7676
if (isset($outputdir) && $outputdir) {
7777
$this->mediamanager->output_dir = $outputdir;
7878
} else {
79-
$this->mediamanager->output_dir = $this->config->output_dir . '/' . strtolower($this->getFormatName()) . '-data/';
79+
$this->mediamanager->output_dir = $this->config->outputDir . '/' . strtolower($this->getFormatName()) . '-data/';
8080
$this->mediamanager->relative_ref_path = basename($this->mediamanager->output_dir) . '/';
8181
}
8282
}

0 commit comments

Comments
 (0)