strikt types
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
// TODO markdown imple
|
||||
function md($str) {
|
||||
function md(string $str): string {
|
||||
// return nl2br ( $str ); // TODO md problem
|
||||
$text = '<p>';
|
||||
$lv = 0;
|
||||
@@ -75,10 +76,10 @@ function md($str) {
|
||||
$text .= '</p>';
|
||||
return $text;
|
||||
}
|
||||
function _md_link_replacer($in) {
|
||||
function _md_link_replacer(array $in): string {
|
||||
// var_dump ( $in );
|
||||
$in = explode ( '|', $in [1], 2 );
|
||||
|
||||
return '<a href="' . $in [0] . '" target="_blank">' . (isset ( $in [1] ) ? $in [1] : $in [0]) . '</a>';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user