Total Complexity | 2 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class EloquentExchangeRegistry implements ExchangeRegistry |
||
10 | { |
||
11 | /** |
||
12 | * {@inheritdoc} |
||
13 | */ |
||
14 | public function record(Enrollment $fromEnrollment, Enrollment $toEnrollment) |
||
15 | { |
||
16 | $logExchange = ExchangeRegistryEntry::make(); |
||
17 | $logExchange->fromShiftRelation()->associate($fromEnrollment->shift); |
||
18 | $logExchange->toShiftRelation()->associate($toEnrollment->shift); |
||
19 | $logExchange->fromStudentRelation()->associate($fromEnrollment->student); |
||
20 | $logExchange->toStudentRelation()->associate($toEnrollment->student); |
||
21 | $logExchange->save(); |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | */ |
||
27 | public function paginate() |
||
30 | } |
||
31 | } |
||
32 |