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(
|
$lines[] = sprintf(
|
||||||
'# %s',
|
'# %s',
|
||||||
\Yggverse\Pulsar\Model\Filter::title(
|
\Yggverse\Pulsar\Model\Filter::string(
|
||||||
$channelItem->title
|
$channelItem->title
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
@ -106,14 +106,14 @@ class Nex implements MessageComponentInterface
|
||||||
|
|
||||||
if ($channelItem->description)
|
if ($channelItem->description)
|
||||||
{
|
{
|
||||||
$lines[] = \Yggverse\Pulsar\Model\Filter::description(
|
$lines[] = \Yggverse\Pulsar\Model\Filter::text(
|
||||||
$channelItem->description
|
$channelItem->description
|
||||||
) . PHP_EOL;
|
) . PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($channelItem->content)
|
if ($channelItem->content)
|
||||||
{
|
{
|
||||||
$lines[] = \Yggverse\Pulsar\Model\Filter::description(
|
$lines[] = \Yggverse\Pulsar\Model\Filter::text(
|
||||||
$channelItem->content
|
$channelItem->content
|
||||||
) . PHP_EOL;
|
) . PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
@ -147,7 +147,7 @@ class Nex implements MessageComponentInterface
|
||||||
{
|
{
|
||||||
$lines[] = sprintf(
|
$lines[] = sprintf(
|
||||||
'# %s',
|
'# %s',
|
||||||
\Yggverse\Pulsar\Model\Filter::title(
|
\Yggverse\Pulsar\Model\Filter::string(
|
||||||
$channel->title
|
$channel->title
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
@ -170,7 +170,7 @@ class Nex implements MessageComponentInterface
|
||||||
'Y-m-d',
|
'Y-m-d',
|
||||||
$channelItem->pubTime
|
$channelItem->pubTime
|
||||||
) : '',
|
) : '',
|
||||||
\Yggverse\Pulsar\Model\Filter::title(
|
\Yggverse\Pulsar\Model\Filter::string(
|
||||||
$channelItem->title
|
$channelItem->title
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ class Filter
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function title(
|
public static function string(
|
||||||
string $value
|
string $value
|
||||||
): string
|
): string
|
||||||
{
|
{
|
||||||
|
|
@ -35,15 +35,6 @@ class Filter
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function description(
|
|
||||||
string $value
|
|
||||||
): string
|
|
||||||
{
|
|
||||||
return self::text(
|
|
||||||
$value
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function text(
|
public static function text(
|
||||||
string $value
|
string $value
|
||||||
): string
|
): string
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue