Passed
Push — master ( 7ab43b...7480b4 )
by Paweł
03:52
created

AccountInfo::map()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 14
nc 1
nop 0
1
<?php
2
/**
3
 * Created for IG Client.
4
 * User: jakim <[email protected]>
5
 * Date: 20.04.2018
6
 */
7
8
namespace Jakim\Mapper;
9
10
11
use Jakim\Base\Mapper;
12
use Jakim\Contract\MapperInterface;
13
use Jakim\Model\Account;
14
15
class AccountInfo extends Mapper implements MapperInterface
16
{
17
18
    /**
19
     * Attributes map.
20
     *
21
     * @return array
22
     */
23
    protected function map(): array
24
    {
25
        return [
26
            Account::class => [
27
                'envelope' => 'user',
28
                'item' => [
29
                    'biography' => 'biography',
30
                    'externalUrl' => 'external_url',
31
                    'followedBy' => 'follower_count',
32
                    'follows' => 'following_count',
33
                    'fullName' => 'full_name',
34
                    'id' => 'pk',
35
                    'isPrivate' => 'is_private',
36
                    'profilePicUrl' => 'hd_profile_pic_url_info.url',
37
                    'username' => 'username',
38
                    'media' => 'media_count',
39
                ],
40
            ],
41
        ];
42
    }
43
}