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() {
|
public function errorMessage() {
|
||||||
//error message
|
//error message
|
||||||
$errorMsg = 'Parameter: <b>' . $this->getMessage() . '</b> is not a valid, numeric values.';
|
return 'Parameter: <b>' . $this->getMessage() . '</b> is not a valid, numeric values.';
|
||||||
return $errorMsg;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,7 @@ final class MDJailSecurityOptionNotSetException extends Exception {
|
||||||
*/
|
*/
|
||||||
public function errorMessage() {
|
public function errorMessage() {
|
||||||
//error message
|
//error message
|
||||||
$errorMsg = 'A security option of MD_JAIL has not been set: <b>' . $this->getMessage() . '</b>).';
|
return 'A security option of MD_JAIL has not been set: <b>' . $this->getMessage() . '</b>).';
|
||||||
return $errorMsg;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,7 @@ final class MDJsonEncodingFailedException extends Exception {
|
||||||
*/
|
*/
|
||||||
public function errorMessage() {
|
public function errorMessage() {
|
||||||
//error message
|
//error message
|
||||||
$errorMsg = 'Failed to encode JSON data.';
|
return 'Failed to encode JSON data.';
|
||||||
return $errorMsg;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,12 +132,10 @@ final class MDFormatter {
|
||||||
*/
|
*/
|
||||||
public static function formatMarkdownCodeBlock(string $content, string $language = ''):string {
|
public static function formatMarkdownCodeBlock(string $content, string $language = ''):string {
|
||||||
|
|
||||||
$output = '```' . $language . '
|
return '```' . $language . '
|
||||||
' . $content . '
|
' . $content . '
|
||||||
```' . PHP_EOL;
|
```' . PHP_EOL;
|
||||||
|
|
||||||
return $output;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -386,11 +386,12 @@ final class MD_STD {
|
||||||
} while($running > 0);
|
} while($running > 0);
|
||||||
|
|
||||||
$res = [];
|
$res = [];
|
||||||
foreach($urls as $i => $url) {
|
$keys = \array_keys($urls);
|
||||||
|
foreach($keys as $i){
|
||||||
$res[$i] = \curl_multi_getcontent($curl_array[$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_remove_handle($mh, $curl_array[$i]);
|
||||||
}
|
}
|
||||||
\curl_multi_close($mh);
|
\curl_multi_close($mh);
|
||||||
|
@ -579,8 +580,7 @@ final class MD_STD {
|
||||||
*/
|
*/
|
||||||
public static function openssl_random_pseudo_bytes(int $length):string {
|
public static function openssl_random_pseudo_bytes(int $length):string {
|
||||||
|
|
||||||
$output = \openssl_random_pseudo_bytes($length);
|
return \openssl_random_pseudo_bytes($length);
|
||||||
return $output;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -750,8 +750,7 @@ final class MD_STD {
|
||||||
*/
|
*/
|
||||||
public static function string_to_color_code(string $str):string {
|
public static function string_to_color_code(string $str):string {
|
||||||
|
|
||||||
$code = \substr(\dechex(\crc32($str)), 0, 6);
|
return \substr(\dechex(\crc32($str)), 0, 6);
|
||||||
return $code;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user