| Conditions | 1 |
| Paths | 1 |
| Total Lines | 27 |
| Code Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | protected function map(): array |
||
| 19 | { |
||
| 20 | return [ |
||
| 21 | Post::class => [ |
||
| 22 | 'envelope' => 'graphql.shortcode_media', |
||
| 23 | 'item' => [ |
||
| 24 | 'id' => 'id', |
||
| 25 | 'shortcode' => 'shortcode', |
||
| 26 | 'url' => 'display_url', |
||
| 27 | 'caption' => 'edge_media_to_caption.edges.0.node.text', |
||
| 28 | 'likes' => 'edge_media_preview_like.count', |
||
| 29 | 'comments' => 'edge_media_to_comment.count', |
||
| 30 | 'takenAt' => 'taken_at_timestamp', |
||
| 31 | 'isVideo' => 'is_video', |
||
| 32 | ], |
||
| 33 | 'relations' => [ |
||
| 34 | 'account' => Account::class, |
||
| 35 | ], |
||
| 36 | ], |
||
| 37 | Account::class => [ |
||
| 38 | 'envelope' => 'owner', //related to parent map |
||
| 39 | 'item' => [ |
||
| 40 | 'id' => 'id', |
||
| 41 | 'username' => 'username', |
||
| 42 | 'profilePicUrl' => 'profile_pic_url', |
||
| 43 | 'fullName' => 'full_name', |
||
| 44 | 'isPrivate' => 'is_private', |
||
| 45 | ], |
||
| 49 | } |