Skip to content

Commit 95ea8c0

Browse files
committed
Code-style cleanup.
- Public before private properties. - Magic before public before private methods.
1 parent 2077e8b commit 95ea8c0

File tree

2 files changed

+33
-31
lines changed

2 files changed

+33
-31
lines changed

Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,5 @@ __*Why "v3.0.0" instead of "v1.0.0?"*__ Prior to phpMussel v3, the "phpMussel Co
5555
[2021.06.08; Maikuolan]: Subtle aesthetic patch.
5656

5757
[2021.09.09; Bug-fix; Maikuolan]: The front-end signature information page reported the wrong counts for unidentified or other under the signature vendor or source counts; Fixed.
58+
59+
[2021.10.30; Maikuolan]: Code-style cleanup: Public before private properties, magic before public before private methods.

src/FrontEnd.php

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,23 @@
88
* License: GNU/GPLv2
99
* @see LICENSE.txt
1010
*
11-
* This file: Front-end handler (last modified: 2021.10.18).
11+
* This file: Front-end handler (last modified: 2021.10.30).
1212
*/
1313

1414
namespace phpMussel\FrontEnd;
1515

1616
class FrontEnd
1717
{
18+
/**
19+
* @var string A path for any custom front-end asset files.
20+
*/
21+
public $CustomAssetsPath = '';
22+
23+
/**
24+
* @var array The query parts (needed for determining which view to select).
25+
*/
26+
public $QueryVariables = [];
27+
1828
/**
1929
* @var \phpMussel\Core\Loader The instantiated loader object.
2030
*/
@@ -36,11 +46,6 @@ class FrontEnd
3646
*/
3747
private $AssetsPath = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR;
3848

39-
/**
40-
* @var string A path for any custom front-end asset files.
41-
*/
42-
public $CustomAssetsPath = '';
43-
4449
/**
4550
* @var string The path to the front-end L10N files.
4651
*/
@@ -86,11 +91,6 @@ class FrontEnd
8691
*/
8792
private $TwoFactorTTL = 600;
8893

89-
/**
90-
* @var array The query parts (needed for determining which view to select).
91-
*/
92-
public $QueryVariables = [];
93-
9494
/**
9595
* @var string|int The default hash algorithm to use (int for PHP < 7.4;
9696
* string for PHP >= 7.4).
@@ -1847,26 +1847,6 @@ public function view(string $Page = ''): void
18471847
}
18481848
}
18491849

1850-
/**
1851-
* Format filesize information.
1852-
*
1853-
* @param int $Filesize
1854-
* @return void
1855-
*/
1856-
private function formatFilesize(int &$Filesize): void
1857-
{
1858-
$Scale = ['field_size_bytes', 'field_size_KB', 'field_size_MB', 'field_size_GB', 'field_size_TB'];
1859-
$Iterate = 0;
1860-
while ($Filesize > 1024) {
1861-
$Filesize /= 1024;
1862-
$Iterate++;
1863-
if ($Iterate > 3) {
1864-
break;
1865-
}
1866-
}
1867-
$Filesize = $this->NumberFormatter->format($Filesize, ($Iterate === 0) ? 0 : 2) . ' ' . $this->Loader->L10N->getPlural($Filesize, $Scale[$Iterate]);
1868-
}
1869-
18701850
/**
18711851
* Generates a list of all currently existing logs.
18721852
*
@@ -1895,6 +1875,26 @@ public function logsRecursiveList(): array
18951875
return $Items;
18961876
}
18971877

1878+
/**
1879+
* Format filesize information.
1880+
*
1881+
* @param int $Filesize
1882+
* @return void
1883+
*/
1884+
private function formatFilesize(int &$Filesize): void
1885+
{
1886+
$Scale = ['field_size_bytes', 'field_size_KB', 'field_size_MB', 'field_size_GB', 'field_size_TB'];
1887+
$Iterate = 0;
1888+
while ($Filesize > 1024) {
1889+
$Filesize /= 1024;
1890+
$Iterate++;
1891+
if ($Iterate > 3) {
1892+
break;
1893+
}
1894+
}
1895+
$Filesize = $this->NumberFormatter->format($Filesize, ($Iterate === 0) ? 0 : 2) . ' ' . $this->Loader->L10N->getPlural($Filesize, $Scale[$Iterate]);
1896+
}
1897+
18981898
/**
18991899
* Filter the available language options provided by the configuration page on
19001900
* the basis of the availability of the corresponding language files.

0 commit comments

Comments
 (0)