strikt types

This commit is contained in:
Troy Grunt
2026-02-15 14:45:02 +01:00
parent a093603c3c
commit cd031464e6
13 changed files with 77 additions and 69 deletions

View File

@@ -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>';
}
?>
?>