Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
40 | 1 | public function addCron(Request $request) |
|
41 | { |
||
42 | 1 | $cronExpression = $request->request->get('expression'); |
|
43 | 1 | $cronId = $request->request->get('cronId'); |
|
44 | |||
45 | 1 | $event = new CronEvent( |
|
46 | 1 | new TimingEvent($cronId), |
|
47 | $cronExpression |
||
48 | ); |
||
49 | |||
50 | 1 | $this->dispatcher->dispatchEvent($event); |
|
51 | |||
52 | 1 | return true; |
|
53 | } |
||
54 | } |
||
55 |