Remove unused variable assignments
This commit is contained in:
parent
80fd164439
commit
ac9b12618d
@ -107,9 +107,8 @@ final class MDErrorReporter {
|
||||
$msg .= \sprintf("%-{$longestKey}s :: %s", $key, (string)$value) . PHP_EOL;
|
||||
}
|
||||
}
|
||||
$msg .= PHP_EOL;
|
||||
|
||||
return $msg;
|
||||
return $msg . PHP_EOL;
|
||||
|
||||
}
|
||||
|
||||
@ -120,15 +119,13 @@ final class MDErrorReporter {
|
||||
*/
|
||||
public function getAdditionalDebuggingInfo():array {
|
||||
|
||||
$output = [
|
||||
return [
|
||||
"Current memory usage" => $this->human_filesize(\memory_get_usage()),
|
||||
"Peak memory usage" => $this->human_filesize(\memory_get_peak_usage()),
|
||||
"Included / required files" => \get_included_files(),
|
||||
# "Allowed memory usage" => $this->human_filesize((int)ini_get("memory_limit")),
|
||||
];
|
||||
|
||||
return $output;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,7 +2,7 @@
|
||||
declare(strict_types = 1);
|
||||
|
||||
/**
|
||||
* Custom exception class for invalid page parameters.
|
||||
* Custom exception class to throw when users attempt to access a page without necessary permissions.
|
||||
*/
|
||||
final class MDAccessDeniedException extends MDExpectedException {
|
||||
/**
|
||||
@ -12,8 +12,7 @@ final class MDAccessDeniedException extends MDExpectedException {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'Parameter: <b>' . $this->getMessage() . '</b> is not a valid, numeric values.';
|
||||
return $errorMsg;
|
||||
return 'Access denied: ' . $this->getMessage();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,7 @@ final class MDConfigCannotBeLoadedException extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'Could not connect to databse. Please try again later.';
|
||||
return $errorMsg;
|
||||
return 'Could not connect to databse. Please try again later.';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,7 @@ class MDExpectedException extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'Parameter: <b>' . $this->getMessage() . '</b> is not a valid, numeric values.';
|
||||
return $errorMsg;
|
||||
return 'Parameter: <b>' . $this->getMessage() . '</b> is not a valid, numeric values.';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -17,8 +17,7 @@ final class MDFileDoesNotExist extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'This file does not exist: ' . $this->getMessage();
|
||||
return $errorMsg;
|
||||
return 'This file does not exist: ' . $this->getMessage();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -17,8 +17,7 @@ final class MDFileIsNotReadable extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'This file does not exist: ' . $this->getMessage();
|
||||
return $errorMsg;
|
||||
return 'This file does not exist: ' . $this->getMessage();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,7 @@ final class MDInaccessiblePropertyException extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'Property is inaccessible';
|
||||
return $errorMsg;
|
||||
return 'Property is inaccessible';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -13,8 +13,7 @@ final class MDInputTooLongException extends MDgenericInvalidInputsException {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'Input string is too long';
|
||||
return $errorMsg;
|
||||
return 'Input string is too long';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,7 @@ final class MDInvalidColorCode extends MDgenericInvalidInputsException {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'Input color code is invalid';
|
||||
return $errorMsg;
|
||||
return 'Input color code is invalid';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -13,8 +13,7 @@ final class MDInvalidEmail extends MDgenericInvalidInputsException {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'Input URL is invalid';
|
||||
return $errorMsg;
|
||||
return 'Input URL is invalid';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -19,8 +19,7 @@ final class MDInvalidEmptyInputException extends MDgenericInvalidInputsException
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'A value needs to be provided: ' . $this->getMessage();
|
||||
return $errorMsg;
|
||||
return 'A value needs to be provided: ' . $this->getMessage();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -13,8 +13,7 @@ final class MDInvalidUrl extends MDgenericInvalidInputsException {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'Input URL is invalid';
|
||||
return $errorMsg;
|
||||
return 'Input URL is invalid';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -17,8 +17,7 @@ final class MDOutputBufferNotStarted extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'Output buffer has not yet been started, is to be used: ' . $this->getMessage();
|
||||
return $errorMsg;
|
||||
return 'Output buffer has not yet been started, is to be used: ' . $this->getMessage();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,7 @@ final class MDRequiredConfigNotSet extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'Could not connect to databse. Please try again later.';
|
||||
return $errorMsg;
|
||||
return 'Could not connect to databse. Please try again later.';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -13,8 +13,7 @@ final class MDWrongCsrfTokenException extends MDgenericInvalidInputsException {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'Input URL is invalid';
|
||||
return $errorMsg;
|
||||
return 'Input URL is invalid';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -13,8 +13,7 @@ class MDgenericInvalidInputsException extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'Inputs are not valid.';
|
||||
return $errorMsg;
|
||||
return 'Inputs are not valid.';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -13,8 +13,7 @@ final class MDhttpFailedException extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'Inputs are not valid.';
|
||||
return $errorMsg;
|
||||
return 'Inputs are not valid.';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -13,8 +13,7 @@ final class MDmainEntityNotExistentException extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'Could not connect to databse. Please try again later.';
|
||||
return $errorMsg;
|
||||
return 'Could not connect to databse. Please try again later.';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -13,8 +13,7 @@ final class MDpageParameterNotFromListException extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'Invalid parameter: <b>' . $this->getMessage() . '</b>.';
|
||||
return $errorMsg;
|
||||
return 'Invalid parameter: <b>' . $this->getMessage() . '</b>.';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -13,8 +13,7 @@ final class MDPageNotInAggregatedException extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'There is no entity to be shown here (id: <b>' . $this->getMessage() . '</b>).';
|
||||
return $errorMsg;
|
||||
return 'There is no entity to be shown here (id: <b>' . $this->getMessage() . '</b>).';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -13,8 +13,7 @@ final class MDmainEntityNotPublicException extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'There is no entity to be shown here (id: <b>' . $this->getMessage() . '</b>).';
|
||||
return $errorMsg;
|
||||
return 'There is no entity to be shown here (id: <b>' . $this->getMessage() . '</b>).';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,7 @@ final class MDpageParameterMissingException extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'Parameter: <b>' . $this->getMessage() . '</b> is required but missing.';
|
||||
return $errorMsg;
|
||||
return 'Parameter: <b>' . $this->getMessage() . '</b> is required but missing.';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,7 @@ final class MDpageParameterNotNumericException extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'Parameter: <b>' . $this->getMessage() . '</b> is not a valid, numeric values.';
|
||||
return $errorMsg;
|
||||
return 'Parameter: <b>' . $this->getMessage() . '</b> is not a valid, numeric values.';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -14,8 +14,7 @@ final class MDDuplicateLinkException extends Exception {
|
||||
public function errorMessage() {
|
||||
|
||||
//error message
|
||||
$errorMsg = 'Duplicate link exception: ' . $this->getMessage() . '.';
|
||||
return $errorMsg;
|
||||
return 'Duplicate link exception: ' . $this->getMessage() . '.';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -17,8 +17,7 @@ final class MDFileIsNotWritable extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'This file or directory cannot be written: ' . $this->getMessage();
|
||||
return $errorMsg;
|
||||
return 'This file or directory cannot be written: ' . $this->getMessage();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -13,8 +13,7 @@ final class MDFileUploadNotAcceptedException extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = $this->getMessage();
|
||||
return $errorMsg;
|
||||
return $this->getMessage();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -20,8 +20,7 @@ final class MDInvalidCurrency extends MDgenericInvalidInputsException {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'The following currency is not available: ' . $this->getMessage();
|
||||
return $errorMsg;
|
||||
return 'The following currency is not available: ' . $this->getMessage();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -20,8 +20,7 @@ final class MDInvalidInputDate extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'The following currency is not available: ' . $this->getMessage();
|
||||
return $errorMsg;
|
||||
return 'The following currency is not available: ' . $this->getMessage();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -20,8 +20,7 @@ final class MDInvalidLengthUnit extends MDgenericInvalidInputsException {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'The following length unit is not available: ' . $this->getMessage();
|
||||
return $errorMsg;
|
||||
return 'The following length unit is not available: ' . $this->getMessage();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -20,8 +20,7 @@ final class MDInvalidLicense extends MDgenericInvalidInputsException {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'The following license is not available: ' . $this->getMessage();
|
||||
return $errorMsg;
|
||||
return 'The following license is not available: ' . $this->getMessage();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -20,8 +20,7 @@ final class MDInvalidObjectPublicationBackground extends MDgenericInvalidInputsE
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'The following object publication type is not available: ' . $this->getMessage();
|
||||
return $errorMsg;
|
||||
return 'The following object publication type is not available: ' . $this->getMessage();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -20,8 +20,7 @@ final class MDInvalidWeightUnit extends MDgenericInvalidInputsException {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'The following weight unit is not available: ' . $this->getMessage();
|
||||
return $errorMsg;
|
||||
return 'The following weight unit is not available: ' . $this->getMessage();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -13,8 +13,7 @@ final class MDNoUpdateVarSetException extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'No update variable has been set.';
|
||||
return $errorMsg;
|
||||
return 'No update variable has been set.';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -19,8 +19,7 @@ final class MDTooManyFilesUploadException extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'This file\'s extension or mimetype is incorrect: ' . $this->getMessage();
|
||||
return $errorMsg;
|
||||
return 'This file\'s extension or mimetype is incorrect: ' . $this->getMessage();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -19,8 +19,7 @@ final class MDWrongFileType extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'This file\'s extension or mimetype is incorrect: ' . $this->getMessage();
|
||||
return $errorMsg;
|
||||
return 'This file\'s extension or mimetype is incorrect: ' . $this->getMessage();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -2,8 +2,7 @@
|
||||
declare(strict_types = 1);
|
||||
|
||||
/**
|
||||
* Exception thrown in case the main entity of a page (e.g. an object, an institution etc.)
|
||||
* are not set public.
|
||||
* Exception thrown in case an update failed.
|
||||
*/
|
||||
final class MDcouldNotSaveException extends Exception {
|
||||
/**
|
||||
@ -13,8 +12,7 @@ final class MDcouldNotSaveException extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'Could not save.';
|
||||
return $errorMsg;
|
||||
return 'Could not save.';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ declare(strict_types = 1);
|
||||
|
||||
/**
|
||||
* Exception thrown in case the main entity of a page (e.g. an object, an institution etc.)
|
||||
* are not set public.
|
||||
* could not be set public.
|
||||
*/
|
||||
final class MDcouldNotSetPublic extends Exception {
|
||||
/**
|
||||
@ -13,8 +13,7 @@ final class MDcouldNotSetPublic extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'Could not set this to public.';
|
||||
return $errorMsg;
|
||||
return 'Could not set this to public.';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -13,8 +13,7 @@ final class MDwriteAccessDeniedException extends Exception {
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
$errorMsg = 'You have no permission to write this.';
|
||||
return $errorMsg;
|
||||
return 'You have no permission to write this.';
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user