Code Duplication    Length = 9-10 lines in 2 locations

src/Output/HTML/Basic.php 1 location

@@ 118-126 (lines=9) @@
115
	/**
116
	 * @return string
117
	 */
118
	protected function img():string{
119
		$url = filter_var($this->content, FILTER_VALIDATE_URL);// @todo
120
121
		if(!$url){
122
			return '';
123
		}
124
125
		return '<img src="'.$url.'" class="bb-img" alt />'; // @todo: alt, title
126
	}
127
128
	/**
129
	 * @return string

src/Output/Markdown/Basic.php 1 location

@@ 51-60 (lines=10) @@
48
	/**
49
	 * @return string
50
	 */
51
	protected function url():string{ // @todo linktext
52
53
		$url = filter_var($this->bbtag() ?? $this->content, FILTER_VALIDATE_URL);// @todo
54
55
		if($url){
56
			return  '[url]('.$url.')';
57
		}
58
59
		return '';
60
	}
61
}
62