Remove superfluous variable assignments
This commit is contained in:
parent
c38f0146dc
commit
23232f4e6a
@ -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.';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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>).';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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.';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user