Total Complexity | 6 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
8 | class Engagement extends Model |
||
9 | { |
||
10 | protected $guarded = []; |
||
11 | protected $appends = [ |
||
12 | 'transcript', |
||
13 | ]; |
||
14 | |||
15 | public function __construct(array $item) |
||
16 | { |
||
17 | if (isset($item['info'])) { |
||
18 | $item['info'] = new Info((array) $item['info']); |
||
19 | } |
||
20 | |||
21 | if (isset($item['visitorInfo'])) { |
||
22 | $item['visitorInfo'] = new Visitor((array) $item['visitorInfo']); |
||
23 | } |
||
24 | |||
25 | if (isset($item['campaign'])) { |
||
26 | $item['campaign'] = new Campaign((array) $item['campaign']); |
||
27 | } |
||
28 | parent::__construct($item); |
||
29 | } |
||
30 | |||
31 | public function getTranscriptAttribute() |
||
39 | } |
||
40 | } |
||
41 |