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

conedevelopment / root / 15084089635

17 May 2025 10:00AM UTC coverage: 77.93% (+0.04%) from 77.891%
15084089635

push

github

web-flow
Modernize back-end.yml (#240)

3291 of 4223 relevant lines covered (77.93%)

36.04 hits per line

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

50.0
/src/Traits/Authorizable.php
1
<?php
2

3
namespace Cone\Root\Traits;
4

5
use Closure;
6
use Illuminate\Http\Request;
7

8
trait Authorizable
9
{
10
    /**
11
     * The authorization resolver callback.
12
     */
13
    protected ?Closure $authorizationResolver = null;
14

15
    /**
16
     * Set the authorization resolver.
17
     */
18
    public function authorize(Closure $callback): static
×
19
    {
20
        $this->authorizationResolver = $callback;
×
21

22
        return $this;
×
23
    }
24

25
    /**
26
     * Resolve the authorization.
27
     */
28
    public function authorized(Request $request, ...$parameters): bool
28✔
29
    {
30
        return is_null($this->authorizationResolver)
28✔
31
            || call_user_func_array($this->authorizationResolver, [$request, ...$parameters]);
28✔
32
    }
33
}
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