Issues (7)

src/BuilderMacroServiceProvider.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Signifly\BuilderMacros;
4
5
use Illuminate\Support\Collection;
6
use Illuminate\Support\ServiceProvider;
7
8
class BuilderMacroServiceProvider extends ServiceProvider
9
{
10
    public function register()
11
    {
12
        Collection::make(glob(__DIR__.'/macros/*.php'))
0 ignored issues
show
glob(__DIR__ . '/macros/*.php') of type array is incompatible with the type Illuminate\Contracts\Support\Arrayable expected by parameter $items of Illuminate\Support\Collection::make(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

12
        Collection::make(/** @scrutinizer ignore-type */ glob(__DIR__.'/macros/*.php'))
Loading history...
13
            ->mapWithKeys(function ($path) {
14
                return [$path => pathinfo($path, PATHINFO_FILENAME)];
15
            })
16
            ->each(function ($macro, $path) {
17
                require_once $path;
18
            });
19
    }
20
}
21