Skip to content

Commit 747a5a2

Browse files
committed
refactor(CollectionMacro): Remove unnecessary method and comments
- Removed squish method and toString method from the Collection class - Removed unnecessary comments and phpdoc blocks
1 parent 6299205 commit 747a5a2

File tree

3 files changed

+0
-43
lines changed

3 files changed

+0
-43
lines changed

_ide_helper.php

-11
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,9 @@ class ExceptionNotify extends Guanguans\LaravelExceptionNotify\Facades\Exception
1515
}
1616

1717
namespace Illuminate\Support {
18-
/**
19-
* @method mixed reduceWithKeys(callable $callback, $carry = null)
20-
*
21-
* @see \Guanguans\LaravelExceptionNotify\Macros\CollectionMacro
22-
* @see \Illuminate\Support\Collection
23-
*/
24-
class Collection {}
25-
2618
/**
2719
* @method string lcfirst($string)
2820
* @method string ucwords($string)
29-
* @method string squish($string)
3021
*
3122
* @see \Guanguans\LaravelExceptionNotify\Macros\StrMacro
3223
* @see \Illuminate\Support\Str
@@ -36,8 +27,6 @@ class Str {}
3627
/**
3728
* @method \Illuminate\Support\Stringable lcfirst()
3829
* @method \Illuminate\Support\Stringable ucwords()
39-
* @method \Illuminate\Support\Stringable squish()
40-
* @method string toString()
4130
*
4231
* @see \Guanguans\LaravelExceptionNotify\Macros\StringableMacro
4332
* @see \Illuminate\Support\Stringable

src/ExceptionNotifyServiceProvider.php

-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
use Guanguans\LaravelExceptionNotify\Commands\TestCommand;
1616
use Guanguans\LaravelExceptionNotify\Facades\ExceptionNotify;
17-
use Guanguans\LaravelExceptionNotify\Macros\CollectionMacro;
1817
use Guanguans\LaravelExceptionNotify\Macros\RequestMacro;
1918
use Guanguans\LaravelExceptionNotify\Macros\StringableMacro;
2019
use Guanguans\LaravelExceptionNotify\Macros\StrMacro;
@@ -23,15 +22,13 @@
2322
use Illuminate\Contracts\Debug\ExceptionHandler;
2423
use Illuminate\Foundation\Exceptions\Handler;
2524
use Illuminate\Http\Request;
26-
use Illuminate\Support\Collection;
2725
use Illuminate\Support\ServiceProvider;
2826
use Illuminate\Support\Str;
2927
use Illuminate\Support\Stringable;
3028

3129
class ExceptionNotifyServiceProvider extends ServiceProvider
3230
{
3331
public array $singletons = [
34-
CollectionMacro::class => CollectionMacro::class,
3532
RequestMacro::class => RequestMacro::class,
3633
StringableMacro::class => StringableMacro::class,
3734
StrMacro::class => StrMacro::class,
@@ -90,7 +87,6 @@ protected function setupConfig(): self
9087
*/
9188
protected function registerMacros(): self
9289
{
93-
// Collection::mixin($this->app->make(CollectionMacro::class));
9490
Request::mixin($this->app->make(RequestMacro::class));
9591
Str::mixin($this->app->make(StrMacro::class));
9692
Stringable::mixin($this->app->make(StringableMacro::class));

src/Macros/CollectionMacro.php

-28
This file was deleted.

0 commit comments

Comments
 (0)