| Conditions | 4 |
| Paths | 8 |
| Total Lines | 16 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | 6 | public function toArray($request) |
|
| 32 | { |
||
| 33 | // return parent::toArray($request); |
||
| 34 | return [ |
||
| 35 | 6 | 'link_id' => $this->link_id, |
|
|
1 ignored issue
–
show
|
|||
| 36 | 6 | 'user_id' => $this->user_id, |
|
|
1 ignored issue
–
show
|
|||
| 37 | 6 | 'cust_id' => $this->cust_id, |
|
|
1 ignored issue
–
show
|
|||
| 38 | 6 | 'cust_name' => $this->cust_id ? Cust::find($this->cust_id)->name : 'None', |
|
|
1 ignored issue
–
show
|
|||
| 39 | 6 | 'link_hash' => $this->link_hash, |
|
|
1 ignored issue
–
show
|
|||
| 40 | 6 | 'link_name' => $this->link_name, |
|
|
1 ignored issue
–
show
|
|||
| 41 | 6 | 'exp_format' => Carbon::parse($this->expire)->format('M d, Y'), |
|
|
1 ignored issue
–
show
|
|||
| 42 | 6 | 'expired' => $this->expire < Carbon::now() ? 1 : 0, |
|
| 43 | 6 | 'exp_stamp' => Carbon::parse($this->expire)->format('Y-m-d'), |
|
| 44 | 6 | 'allow_upload' => $this->allow_upload, |
|
|
1 ignored issue
–
show
|
|||
| 45 | 6 | 'file_count' => isset($this->file_link_files_count) ? $this->file_link_files_count : 0, |
|
|
1 ignored issue
–
show
|
|||
| 46 | 6 | 'note' => $this->note |
|
|
1 ignored issue
–
show
|
|||
| 47 | ]; |
||
| 50 |