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

phpolar / phpolar / 19429817281

17 Nov 2025 12:35PM UTC coverage: 88.983% (-11.0%) from 100.0%
19429817281

push

github

web-flow
508 rename abstractprotectedroutable to abstractrestrictedaccessrequestprocessor (#509)

* feat: rename to abstract restricted access request processor

The new name is more meaningful.

* docs: update project size threshold

Leaving the deprecated classes is causing the project size to increase.

26 of 28 new or added lines in 3 files covered. (92.86%)

24 existing lines in 2 files now uncovered.

210 of 236 relevant lines covered (88.98%)

5.28 hits per line

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

0.0
/src/Auth/AbstractProtectedRoutable.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Phpolar\Phpolar\Auth;
6

7
use Deprecated;
8
use Phpolar\HttpRequestProcessor\RequestProcessorInterface;
9

10
/**
11
 * Represents a target object for a request route
12
 * that requires authorization.
13
 *
14
 * Objects that extend this class will have access
15
 * to metadata associated with the authenticated
16
 * user.  Route target objects that require
17
 * authorization should extend this class.
18
 *
19
 * @deprecated Use AbstractRestrictedAccessRequestProcessor instead.
20
 *
21
 * @phan-file-suppress PhanWriteOnlyPublicProperty
22
 */
23
abstract class AbstractProtectedRoutable implements RequestProcessorInterface
24
{
25
    /**
26
     * Contains credentials for an authenticated user
27
     */
28
    public User $user;
29

30
    /**
31
     * Create a `User` from the given user object
32
     * and assign it to the user property.
33
     */
34
    public function withUser(object $user): self
35
    {
UNCOV
36
        $copy = clone $this;
×
UNCOV
37
        $copy->user = new User(
×
UNCOV
38
            avatarUrl: $user->avatarUrl ?? "",
×
UNCOV
39
            email: $user->email ?? "",
×
UNCOV
40
            name: $user->name ?? "",
×
UNCOV
41
            nickname: $user->nickname ?? "",
×
UNCOV
42
            picture: $user->picture ?? null,
×
UNCOV
43
        );
×
UNCOV
44
        return $copy;
×
45
    }
46
}
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

© 2025 Coveralls, Inc