• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mpyw / laravel-local-class-scope / 4404536155

pending completion
4404536155

push

github

GitHub
Update ci.yml

11 of 11 relevant lines covered (100.0%)

10.09 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/LocalClassScopeServiceProvider.php
1
<?php
2

3
namespace Mpyw\LaravelLocalClassScope;
4

5
use Illuminate\Database\Eloquent\Builder;
6
use Illuminate\Support\ServiceProvider;
7

8
class LocalClassScopeServiceProvider extends ServiceProvider
9
{
10
    /**
11
     * Register Eloquent\Builder::scoped() macro.
12
     */
13
    public function boot(): void
14
    {
15
        Builder::macro('scoped', function ($scope, ...$parameters) {
12✔
16
            $query = $this;
12✔
17
            \assert($query instanceof Builder);
18
            return (new ScopedMacro($query))($scope, ...$parameters);
12✔
19
        });
12✔
20
    }
21
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc