mirror of
https://github.com/moparisthebest/wallabag
synced 2024-11-27 03:12:21 -05:00
[fix] change functions to static functions
This commit is contained in:
parent
456f08d9a8
commit
58c63911d7
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user