Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
AuthResult
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 isSuccess
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace App\Domain\Auth\ValueObject;
6
7use App\Domain\Auth\Entity\UserRecord;
8
9 class AuthResult
10{
11    public function __construct(
12        public  ?UserRecord $user = null,
13        public  ?AuthCause $cause = null,
14        public  ?int $attemptedUserId = null
15    ) {}
16
17    public function isSuccess(): bool
18    {
19        return $this->user !== null;
20    }
21}