24 lines
623 B
PHP
24 lines
623 B
PHP
<?php
|
|
|
|
namespace App\Services\Devices;
|
|
|
|
use App\Models\UserDevice;
|
|
|
|
/**
|
|
* What a sign-in turned out to be.
|
|
*
|
|
* `isNew` and `shouldWarn` are deliberately two fields rather than one. The
|
|
* very first device on an account is new and must still not produce a warning:
|
|
* telling somebody that they have just signed in from a new device, in reply to
|
|
* them creating the account, is noise on the one message that has to stay
|
|
* worth reading.
|
|
*/
|
|
final readonly class DeviceOutcome
|
|
{
|
|
public function __construct(
|
|
public UserDevice $device,
|
|
public bool $isNew,
|
|
public bool $shouldWarn,
|
|
) {}
|
|
}
|