Completed
Pull Request — master (#258)
by Sergey
02:44
created

Profile::setUserName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
rs 9.4285
nc 1
cc 1
eloc 3
nop 1
1
<?php
2
3
namespace seregazhuk\PinterestBot\Api\Forms;
4
5
class Profile extends Form
6
{
7
    /**
8
     * @var string
9
     */
10
    protected $lastName;
11
12
    /**
13
     * @var string
14
     */
15
    protected $firstName;
16
17
    /**
18
     * @var string
19
     */
20
    protected $userName;
21
22
    /**
23
     * @var string
24
     */
25
    protected $about;
26
27
    /**
28
     * @var string
29
     */
30
    protected $location;
31
32
    /**
33
     * @var string
34
     */
35
    protected $websiteUrl;
36
37
    /**
38
     * @var string
39
     */
40
    protected $image;
41
42
    /**
43
     * @var string
44
     */
45
    protected $country;
46
47
    /**
48
     * @param mixed $lastName
49
     * @return Profile
50
     */
51
    public function setLastName($lastName)
52
    {
53
        $this->lastName = $lastName;
54
        return $this;
55
    }
56
57
    /**
58
     * @param mixed $firstName
59
     * @return Profile
60
     */
61
    public function setFirstName($firstName)
62
    {
63
        $this->firstName = $firstName;
64
        return $this;
65
    }
66
67
    /**
68
     * @param mixed $userName
69
     * @return Profile
70
     */
71
    public function setUserName($userName)
72
    {
73
        $this->userName = $userName;
74
        return $this;
75
    }
76
77
    /**
78
     * @param mixed $about
79
     * @return Profile
80
     */
81
    public function setAbout($about)
82
    {
83
        $this->about = $about;
84
        return $this;
85
    }
86
87
    /**
88
     * @param mixed $location
89
     * @return Profile
90
     */
91
    public function setLocation($location)
92
    {
93
        $this->location = $location;
94
        return $this;
95
    }
96
97
    /**
98
     * @param mixed $websiteUrl
99
     * @return Profile
100
     */
101
    public function setWebsiteUrl($websiteUrl)
102
    {
103
        $this->websiteUrl = $websiteUrl;
104
        return $this;
105
    }
106
107
    /**
108
     * @param mixed $image
109
     * @return Profile
110
     */
111
    public function setImage($image)
112
    {
113
        $this->image = $image;
114
        return $this;
115
    }
116
117
    /**
118
     * @return array
119
     */
120
    public function toArray()
121
    {
122
        return [
123
            'last_name'     => $this->lastName,
124
            'first_name'    => $this->firstName,
125
            'username'      => $this->userName,
126
            'about'         => $this->about,
127
            'location'      => $this->location,
128
            'website_url'   => $this->websiteUrl,
129
            'profile_image' => $this->image,
130
        ];
131
    }
132
133
    /**
134
     * @param string $country
135
     * @return Profile
136
     */
137
    public function setCountry($country)
138
    {
139
        $this->country = $country;
140
        return $this;
141
    }
142
}