Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
ResetUserPreferencesCommand
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
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
1<?php
2
3declare(strict_types=1);
4
5/** @license For full copyright and license information, please see the LICENSE.md file. */
6
7namespace App\Core\Preference\Application\Command;
8
9defined('AMMONLY_APP') || exit('Direct script access is forbidden.');
10
11use App\Core\Preference\Domain\Model\PreferenceScope;
12
13/**
14 * Command for resetting/deleting user preferences by scope.
15 *
16 * @package App\Core\Preference\Application\Command
17 */
18final readonly class ResetUserPreferencesCommand
19{
20    /**
21     * ResetUserPreferencesCommand constructor.
22     *
23     * @param PreferenceScope $scope Scope defining the user, device, and module to reset.
24     * @param string|null     $key   Optional specific key to reset.
25     */
26    public function __construct(
27        public PreferenceScope $scope,
28        public ?string $key = null,
29    ) {
30    }
31}