Remove superfluous final keywords (e.g. final private)

This commit is contained in:
Joshua Ramon Enslin 2021-05-14 00:08:11 +02:00
parent 49669ccf97
commit bd2f425afe
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -25,7 +25,7 @@ final class MDErrorReporter {
* *
* @return integer * @return integer
*/ */
final public static function categorizeError(Throwable $exception):int { public static function categorizeError(Throwable $exception):int {
if ($exception instanceof MDpageParameterMissingException if ($exception instanceof MDpageParameterMissingException
|| $exception instanceof MDpageParameterNotNumericException || $exception instanceof MDpageParameterNotNumericException
@ -59,7 +59,7 @@ final class MDErrorReporter {
* *
* @return string * @return string
*/ */
final public function human_filesize(string $bytes, int $decimals = 2):string { public function human_filesize(string $bytes, int $decimals = 2):string {
$size = ['B','kB','MB','GB','TB','PB','EB','ZB','YB']; $size = ['B','kB','MB','GB','TB','PB','EB','ZB','YB'];
$factor = \floor((strlen($bytes) - 1) / 3); $factor = \floor((strlen($bytes) - 1) / 3);
@ -77,7 +77,7 @@ final class MDErrorReporter {
* *
* @return string * @return string
*/ */
final private function _formulateDebugMailSection(string $headline, array $toFormat, int $level = 0):string { private function _formulateDebugMailSection(string $headline, array $toFormat, int $level = 0):string {
$msg = ""; $msg = "";
if ($headline !== "") { if ($headline !== "") {
@ -118,7 +118,7 @@ final class MDErrorReporter {
* *
* @return array<string|array<string>> * @return array<string|array<string>>
*/ */
final public function getAdditionalDebuggingInfo():array { public function getAdditionalDebuggingInfo():array {
$output = [ $output = [
"Current memory usage" => $this->human_filesize((string)\memory_get_usage()), "Current memory usage" => $this->human_filesize((string)\memory_get_usage()),
@ -143,7 +143,7 @@ final class MDErrorReporter {
* *
* @return void * @return void
*/ */
final public function sendDebugMail(string $to, string $subject = "", string $description = "", array $contextInfo = []):void { public function sendDebugMail(string $to, string $subject = "", string $description = "", array $contextInfo = []):void {
$subject = "[{$this->_context}]{$subject}[Controlled error notification]"; $subject = "[{$this->_context}]{$subject}[Controlled error notification]";
@ -220,7 +220,7 @@ final class MDErrorReporter {
* *
* @return void * @return void
*/ */
final public function sendErrorReport(Throwable $exception, string $recipient, string $addDesc = ""):void { public function sendErrorReport(Throwable $exception, string $recipient, string $addDesc = ""):void {
$subject = \get_class($exception) . ": " . $exception->getCode(); $subject = \get_class($exception) . ": " . $exception->getCode();