1 | <?php |
||
13 | class UpdateOrCreatePermission |
||
14 | { |
||
15 | private $exists; |
||
16 | private $create; |
||
17 | private $update; |
||
18 | private $unique; |
||
19 | |||
20 | /** |
||
21 | * UpdateOrCreatePermission constructor. |
||
22 | * @throws \Illuminate\Contracts\Container\BindingResolutionException |
||
23 | */ |
||
24 | 17 | public function __construct() |
|
31 | |||
32 | /** |
||
33 | * @param Permission $permission |
||
34 | * @return bool |
||
35 | * @throws PermissionAlreadyExistsException |
||
36 | * @throws PermissionNameExistsMustBeUniqueException |
||
37 | */ |
||
38 | 17 | public function make(Permission $permission): bool |
|
46 | |||
47 | /** |
||
48 | * @param Permission $permission |
||
49 | * @return bool |
||
50 | * @throws PermissionAlreadyExistsException |
||
51 | */ |
||
52 | 17 | private function create(Permission $permission): bool |
|
62 | |||
63 | /** |
||
64 | * @param Permission $permission |
||
65 | * @return bool |
||
66 | * @throws PermissionNameExistsMustBeUniqueException |
||
67 | */ |
||
68 | 2 | private function update(Permission $permission): bool |
|
78 | } |
||
79 |