Skip to content

Commit af8c526

Browse files
committed
refactor(src): remove unnecessary code
- Remove unused import - Remove unused method
1 parent cd96d45 commit af8c526

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

src/ExceptionNotifyManager.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
use Guanguans\LaravelExceptionNotify\Jobs\ReportExceptionJob;
3232
use Guanguans\Notify\Factory;
3333
use Illuminate\Cache\RateLimiter;
34-
use Illuminate\Contracts\Container\BindingResolutionException;
3534
use Illuminate\Support\Arr;
3635
use Illuminate\Support\Manager;
3736
use Illuminate\Support\Str;
@@ -108,9 +107,6 @@ public function getDefaultDriver()
108107
return Arr::first((array) config('exception-notify.defaults'));
109108
}
110109

111-
/**
112-
* @throws BindingResolutionException
113-
*/
114110
protected function shouldntReport(\Throwable $throwable): bool
115111
{
116112
if (! config('exception-notify.enabled')) {

src/Jobs/ReportExceptionJob.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ public function __construct(array $reports)
4343
}
4444
}
4545

46-
/**
47-
* @noinspection BadExceptionsProcessingInspection
48-
*/
4946
public function handle(): void
5047
{
5148
foreach ($this->reports as $name => $report) {

tests/Macros/RequestMacroTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22

3-
/** @noinspection NullPointerExceptionInspection */
4-
53
declare(strict_types=1);
64

75
/**
@@ -12,8 +10,10 @@
1210
* This source file is subject to the MIT license that is bundled.
1311
*/
1412

13+
use Illuminate\Http\Request;
14+
1515
it('can get headers', function (): void {
16-
expect(request())
16+
expect($this->app->make(Request::class))
1717
->headers()->toBeArray()
1818
->headers('user-agent')->toBeString();
1919
})->group(__DIR__, __FILE__);

tests/Pipes/PipeTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
)
3636
->through(FixPrettyJsonPipe::class)
3737
->then(
38+
/**
39+
* @throws JsonException
40+
*/
3841
static fn (Collection $collectors): Stringable => str(to_pretty_json($collectors->jsonSerialize()))
3942
->substr(-256)
4043
);

tests/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected function tearDown(): void
5353
{
5454
parent::tearDown();
5555
if ($container = \Mockery::getContainer()) {
56-
$this->addToAssertionCount($container->Mockery_getExpectationCount());
56+
$this->addToAssertionCount($container->mockery_getExpectationCount());
5757
}
5858

5959
\Mockery::close();

0 commit comments

Comments
 (0)