11
11
12
12
namespace CachetHQ \Cachet \Bus \Handlers \Commands \ComponentGroup ;
13
13
14
- use CachetHQ \Cachet \Bus \Commands \ComponentGroup \AddComponentGroupCommand ;
15
- use CachetHQ \Cachet \Bus \Events \ComponentGroup \ComponentGroupWasAddedEvent ;
14
+ use CachetHQ \Cachet \Bus \Commands \ComponentGroup \CreateComponentGroupCommand ;
15
+ use CachetHQ \Cachet \Bus \Events \ComponentGroup \ComponentGroupWasCreatedEvent ;
16
16
use CachetHQ \Cachet \Models \ComponentGroup ;
17
17
use Illuminate \Contracts \Auth \Guard ;
18
18
19
- class AddComponentGroupCommandHandler
19
+ class CreateComponentGroupCommandHandler
20
20
{
21
21
/**
22
22
* The authentication guard instance.
@@ -26,7 +26,7 @@ class AddComponentGroupCommandHandler
26
26
protected $ auth ;
27
27
28
28
/**
29
- * Create a new add component group command handler instance.
29
+ * Create a new create component group command handler instance.
30
30
*
31
31
* @param \Illuminate\Contracts\Auth\Guard $auth
32
32
*
@@ -38,13 +38,13 @@ public function __construct(Guard $auth)
38
38
}
39
39
40
40
/**
41
- * Handle the add component group command.
41
+ * Handle the create component group command.
42
42
*
43
- * @param \CachetHQ\Cachet\Bus\Commands\ComponentGroup\AddComponentGroupCommand $command
43
+ * @param \CachetHQ\Cachet\Bus\Commands\ComponentGroup\CreateComponentGroupCommand $command
44
44
*
45
45
* @return \CachetHQ\Cachet\Models\ComponentGroup
46
46
*/
47
- public function handle (AddComponentGroupCommand $ command )
47
+ public function handle (CreateComponentGroupCommand $ command )
48
48
{
49
49
$ group = ComponentGroup::create ([
50
50
'name ' => $ command ->name ,
@@ -53,7 +53,7 @@ public function handle(AddComponentGroupCommand $command)
53
53
'visible ' => $ command ->visible ,
54
54
]);
55
55
56
- event (new ComponentGroupWasAddedEvent ($ this ->auth ->user (), $ group ));
56
+ event (new ComponentGroupWasCreatedEvent ($ this ->auth ->user (), $ group ));
57
57
58
58
return $ group ;
59
59
}
0 commit comments