Skip to content

Commit

Permalink
refactor(pipes): rename ToMarkdownPipe to SprintfMarkdownPipe
Browse files Browse the repository at this point in the history
- Rename ToMarkdownPipe to SprintfMarkdownPipe
- Update references to the renamed class
  • Loading branch information
guanguans committed Oct 18, 2023
1 parent a90d2a7 commit 4232a01
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions config/exception-notify.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use Guanguans\LaravelExceptionNotify\Pipes\LimitLengthPipe;
use Guanguans\LaravelExceptionNotify\Pipes\ReplaceStrPipe;
use Guanguans\LaravelExceptionNotify\Pipes\SprintfHtmlPipe;
use Guanguans\LaravelExceptionNotify\Pipes\ToMarkdownPipe;
use Guanguans\LaravelExceptionNotify\Pipes\SprintfMarkdownPipe;
use Guanguans\LaravelExceptionNotify\ReportUsingCreator;

return [
Expand Down Expand Up @@ -236,7 +236,7 @@
'token' => env('EXCEPTION_NOTIFY_PUSHDEER_TOKEN'),
'base_uri' => env('EXCEPTION_NOTIFY_PUSHDEER_BASE_URI'),
'pipes' => [
ToMarkdownPipe::class,
SprintfMarkdownPipe::class,
],
],

Expand Down Expand Up @@ -280,7 +280,7 @@
'webhook_url' => env('EXCEPTION_NOTIFY_SLACK_WEBHOOK_URL'),
'channel' => env('EXCEPTION_NOTIFY_SLACK_CHANNEL'),
'pipes' => [
ToMarkdownPipe::class,
SprintfMarkdownPipe::class,
],
],

Expand Down Expand Up @@ -323,7 +323,7 @@
'type' => env('EXCEPTION_NOTIFY_XIZHI_TYPE', 'single'), // [single, channel]
'token' => env('EXCEPTION_NOTIFY_XIZHI_TOKEN'),
'pipes' => [
ToMarkdownPipe::class,
SprintfMarkdownPipe::class,
],
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use Illuminate\Support\Collection;
use Illuminate\Support\Stringable;

class ToMarkdownPipe extends SprintfPipe
class SprintfMarkdownPipe extends SprintfPipe
{
public function handle(
Collection $collectors,
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
use Guanguans\LaravelExceptionNotify\Pipes\LimitLengthPipe;
use Guanguans\LaravelExceptionNotify\Pipes\ReplaceStrPipe;
use Guanguans\LaravelExceptionNotify\Pipes\SprintfHtmlPipe;
use Guanguans\LaravelExceptionNotify\Pipes\ToMarkdownPipe;
use Guanguans\LaravelExceptionNotify\Pipes\SprintfMarkdownPipe;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use Symfony\Component\VarDumper\Test\VarDumperTestTrait;

Expand Down Expand Up @@ -95,7 +95,7 @@ protected function defineEnvironment($app): void
config()->set('exception-notify.channels.null.pipes', [
hydrate_pipe(AddKeywordPipe::class, 'keyword'),
SprintfHtmlPipe::class,
ToMarkdownPipe::class,
SprintfMarkdownPipe::class,
FixPrettyJsonPipe::class,
hydrate_pipe(LimitLengthPipe::class, 512),
hydrate_pipe(ReplaceStrPipe::class, '.php', '.PHP'),
Expand Down

0 comments on commit 4232a01

Please sign in to comment.