Remove superfluous variable assignments

This commit is contained in:
Joshua Ramon Enslin 2022-09-15 21:38:41 +02:00
parent c38f0146dc
commit 23232f4e6a
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE
5 changed files with 9 additions and 15 deletions

View File

@ -13,8 +13,7 @@ final class MDCoordinateOutOfRange extends MDExpectedException {
*/
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.';
}
}

View File

@ -12,8 +12,7 @@ final class MDJailSecurityOptionNotSetException extends Exception {
*/
public function errorMessage() {
//error message
$errorMsg = 'A security option of MD_JAIL has not been set: <b>' . $this->getMessage() . '</b>).';
return $errorMsg;
return 'A security option of MD_JAIL has not been set: <b>' . $this->getMessage() . '</b>).';
}
}

View File

@ -12,8 +12,7 @@ final class MDJsonEncodingFailedException extends Exception {
*/
public function errorMessage() {
//error message
$errorMsg = 'Failed to encode JSON data.';
return $errorMsg;
return 'Failed to encode JSON data.';
}
}

View File

@ -132,12 +132,10 @@ final class MDFormatter {
*/
public static function formatMarkdownCodeBlock(string $content, string $language = ''):string {
$output = '```' . $language . '
return '```' . $language . '
' . $content . '
```' . PHP_EOL;
return $output;
}
/**

View File

@ -386,11 +386,12 @@ final class MD_STD {
} while($running > 0);
$res = [];
foreach($urls as $i => $url) {
$keys = \array_keys($urls);
foreach($keys as $i){
$res[$i] = \curl_multi_getcontent($curl_array[$i]) ?: '';
}
foreach($urls as $i => $url){
foreach($keys as $i){
\curl_multi_remove_handle($mh, $curl_array[$i]);
}
\curl_multi_close($mh);
@ -579,8 +580,7 @@ final class MD_STD {
*/
public static function openssl_random_pseudo_bytes(int $length):string {
$output = \openssl_random_pseudo_bytes($length);
return $output;
return \openssl_random_pseudo_bytes($length);
}
@ -750,8 +750,7 @@ final class MD_STD {
*/
public static function string_to_color_code(string $str):string {
$code = \substr(\dechex(\crc32($str)), 0, 6);
return $code;
return \substr(\dechex(\crc32($str)), 0, 6);
}