| Code Coverage | ||||||||||
| Lines | Functions and Methods | Classes and Traits | ||||||||
| Total |  | 14.29% | 1 / 7 |  | 14.29% | 1 / 7 | CRAP |  | 0.00% | 0 / 1 | 
| ApieUserDecorator |  | 14.29% | 1 / 7 |  | 14.29% | 1 / 7 | 37.86 |  | 0.00% | 0 / 1 | 
| getAuthIdentifierName |  | 0.00% | 0 / 1 |  | 0.00% | 0 / 1 | 2 | |||
| getAuthIdentifier |  | 100.00% | 1 / 1 |  | 100.00% | 1 / 1 | 1 | |||
| getAuthPassword |  | 0.00% | 0 / 1 |  | 0.00% | 0 / 1 | 2 | |||
| getRememberToken |  | 0.00% | 0 / 1 |  | 0.00% | 0 / 1 | 2 | |||
| setRememberToken |  | 0.00% | 0 / 1 |  | 0.00% | 0 / 1 | 2 | |||
| getAuthPasswordName |  | 0.00% | 0 / 1 |  | 0.00% | 0 / 1 | 2 | |||
| getRememberTokenName |  | 0.00% | 0 / 1 |  | 0.00% | 0 / 1 | 2 | |||
| 1 | <?php | 
| 2 | namespace Apie\LaravelApie\Wrappers\Security; | 
| 3 | |
| 4 | use Apie\Common\Wrappers\AbstractApieUserDecorator; | 
| 5 | use Apie\Core\Entities\EntityInterface; | 
| 6 | use Illuminate\Contracts\Auth\Authenticatable; | 
| 7 | |
| 8 | /** | 
| 9 | * Decorator around an Apie entity to tell Laravel we are logged in. | 
| 10 | * | 
| 11 | * @template T of EntityInterface | 
| 12 | * @extends AbstractApieUserDecorator<T> | 
| 13 | */ | 
| 14 | final class ApieUserDecorator extends AbstractApieUserDecorator implements Authenticatable | 
| 15 | { | 
| 16 | public function getAuthIdentifierName() | 
| 17 | { | 
| 18 | return $this->entity->getId(); | 
| 19 | } | 
| 20 | public function getAuthIdentifier() | 
| 21 | { | 
| 22 | return $this->id->toNative(); | 
| 23 | } | 
| 24 | |
| 25 | public function getAuthPassword() | 
| 26 | { | 
| 27 | return ''; | 
| 28 | } | 
| 29 | |
| 30 | public function getRememberToken() | 
| 31 | { | 
| 32 | return ''; | 
| 33 | } | 
| 34 | |
| 35 | public function setRememberToken($token) | 
| 36 | { | 
| 37 | } | 
| 38 | |
| 39 | public function getAuthPasswordName(): string | 
| 40 | { | 
| 41 | return ''; | 
| 42 | } | 
| 43 | |
| 44 | public function getRememberTokenName() | 
| 45 | { | 
| 46 | return ''; | 
| 47 | } | 
| 48 | } |