mirror of
https://github.com/YGGverse/Pulsar.git
synced 2026-03-31 17:55:37 +00:00
update filter methods
This commit is contained in:
parent
a3c3f0bad0
commit
31a6703374
2 changed files with 6 additions and 15 deletions
|
|
@ -90,7 +90,7 @@ class Nex implements MessageComponentInterface
|
|||
{
|
||||
$lines[] = sprintf(
|
||||
'# %s',
|
||||
\Yggverse\Pulsar\Model\Filter::title(
|
||||
\Yggverse\Pulsar\Model\Filter::string(
|
||||
$channelItem->title
|
||||
)
|
||||
);
|
||||
|
|
@ -106,14 +106,14 @@ class Nex implements MessageComponentInterface
|
|||
|
||||
if ($channelItem->description)
|
||||
{
|
||||
$lines[] = \Yggverse\Pulsar\Model\Filter::description(
|
||||
$lines[] = \Yggverse\Pulsar\Model\Filter::text(
|
||||
$channelItem->description
|
||||
) . PHP_EOL;
|
||||
}
|
||||
|
||||
if ($channelItem->content)
|
||||
{
|
||||
$lines[] = \Yggverse\Pulsar\Model\Filter::description(
|
||||
$lines[] = \Yggverse\Pulsar\Model\Filter::text(
|
||||
$channelItem->content
|
||||
) . PHP_EOL;
|
||||
}
|
||||
|
|
@ -147,7 +147,7 @@ class Nex implements MessageComponentInterface
|
|||
{
|
||||
$lines[] = sprintf(
|
||||
'# %s',
|
||||
\Yggverse\Pulsar\Model\Filter::title(
|
||||
\Yggverse\Pulsar\Model\Filter::string(
|
||||
$channel->title
|
||||
)
|
||||
);
|
||||
|
|
@ -170,7 +170,7 @@ class Nex implements MessageComponentInterface
|
|||
'Y-m-d',
|
||||
$channelItem->pubTime
|
||||
) : '',
|
||||
\Yggverse\Pulsar\Model\Filter::title(
|
||||
\Yggverse\Pulsar\Model\Filter::string(
|
||||
$channelItem->title
|
||||
)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class Filter
|
|||
);
|
||||
}
|
||||
|
||||
public static function title(
|
||||
public static function string(
|
||||
string $value
|
||||
): string
|
||||
{
|
||||
|
|
@ -35,15 +35,6 @@ class Filter
|
|||
);
|
||||
}
|
||||
|
||||
public static function description(
|
||||
string $value
|
||||
): string
|
||||
{
|
||||
return self::text(
|
||||
$value
|
||||
);
|
||||
}
|
||||
|
||||
public static function text(
|
||||
string $value
|
||||
): string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue