Skip to content

Commit 17f7a9d

Browse files
docs: phpdoc incorrect explanation regarding variable naming (#9326)
* Update FileHandler.php * Update BaseConnection.php * Update Connection.php * Update filesystem_helper.php * Update Security.php * Update SecurityInterface.php
1 parent 61881bd commit 17f7a9d

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

system/Cache/Handlers/FileHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -337,13 +337,13 @@ protected function getDirFileInfo(string $sourceDir, bool $topLevelOnly = true,
337337
$relativePath = $sourceDir;
338338

339339
if ($fp = @opendir($sourceDir)) {
340-
// reset the array and make sure $source_dir has a trailing slash on the initial call
340+
// reset the array and make sure $sourceDir has a trailing slash on the initial call
341341
if ($_recursion === false) {
342342
$_filedata = [];
343343
$sourceDir = rtrim(realpath($sourceDir) ?: $sourceDir, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
344344
}
345345

346-
// Used to be foreach (scandir($source_dir, 1) as $file), but scandir() is simply not as fast
346+
// Used to be foreach (scandir($sourceDir, 1) as $file), but scandir() is simply not as fast
347347
while (false !== ($file = readdir($fp))) {
348348
if (is_dir($sourceDir . $file) && $file[0] !== '.' && $topLevelOnly === false) {
349349
$this->getDirFileInfo($sourceDir . $file . DIRECTORY_SEPARATOR, $topLevelOnly, true);

system/Database/BaseConnection.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ public function initialize()
406406
/* If an established connection is available, then there's
407407
* no need to connect and select the database.
408408
*
409-
* Depending on the database driver, conn_id can be either
409+
* Depending on the database driver, connID can be either
410410
* boolean TRUE, a resource or an object.
411411
*/
412412
if ($this->connID) {
@@ -846,7 +846,7 @@ public function transBegin(bool $testMode = false): bool
846846
}
847847

848848
// Reset the transaction failure flag.
849-
// If the $test_mode flag is set to TRUE transactions will be rolled back
849+
// If the $testMode flag is set to TRUE transactions will be rolled back
850850
// even if the queries produce a successful result.
851851
$this->transFailure = $testMode;
852852

system/Database/MySQLi/Connection.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class Connection extends BaseConnection
5757
/**
5858
* MySQLi object
5959
*
60-
* Has to be preserved without being assigned to $conn_id.
60+
* Has to be preserved without being assigned to $connId.
6161
*
6262
* @var false|mysqli
6363
*/

system/Helpers/filesystem_helper.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -260,13 +260,13 @@ function get_dir_file_info(string $sourceDir, bool $topLevelOnly = true, bool $r
260260
try {
261261
$fp = opendir($sourceDir);
262262

263-
// reset the array and make sure $source_dir has a trailing slash on the initial call
263+
// reset the array and make sure $sourceDir has a trailing slash on the initial call
264264
if ($recursion === false) {
265265
$fileData = [];
266266
$sourceDir = rtrim(realpath($sourceDir), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
267267
}
268268

269-
// Used to be foreach (scandir($source_dir, 1) as $file), but scandir() is simply not as fast
269+
// Used to be foreach (scandir($sourceDir, 1) as $file), but scandir() is simply not as fast
270270
while (false !== ($file = readdir($fp))) {
271271
if (is_dir($sourceDir . $file) && $file[0] !== '.' && $topLevelOnly === false) {
272272
get_dir_file_info($sourceDir . $file . DIRECTORY_SEPARATOR, $topLevelOnly, true);

system/Security/Security.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ public function shouldRedirect(): bool
422422
*
423423
* If it is acceptable for the user input to include relative paths,
424424
* e.g. file/in/some/approved/folder.txt, you can set the second optional
425-
* parameter, $relative_path to TRUE.
425+
* parameter, $relativePath to TRUE.
426426
*
427427
* @param string $str Input file name
428428
* @param bool $relativePath Whether to preserve paths

system/Security/SecurityInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function shouldRedirect(): bool;
6464
*
6565
* If it is acceptable for the user input to include relative paths,
6666
* e.g. file/in/some/approved/folder.txt, you can set the second optional
67-
* parameter, $relative_path to TRUE.
67+
* parameter, $relativePath to TRUE.
6868
*
6969
* @param string $str Input file name
7070
* @param bool $relativePath Whether to preserve paths

0 commit comments

Comments
 (0)