1
0
mirror of https://github.com/moparisthebest/wallabag synced 2024-11-30 04:42:19 -05:00

[fix] change functions to static functions

This commit is contained in:
Nicolas Lœuillet 2014-01-16 14:26:38 +01:00
parent 456f08d9a8
commit 58c63911d7

View File

@ -12,12 +12,12 @@ namespace Poche\Twig;
class Filter
{
public function getDomain($url)
public static function getDomain($url)
{
return parse_url($url, PHP_URL_HOST);
}
public function getReadingTime($text)
public static function getReadingTime($text)
{
$word = str_word_count(strip_tags($text));
$minutes = floor($word / 200);
@ -27,7 +27,7 @@ class Filter
return $minutes;
}
public function getPicture($text)
public static function getPicture($text)
{
$output = preg_match('/<img.+src=[\'"]([^\'"]+)[\'"].*>/Ui', $text, $result);