This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
6
{
7
public $id;
8
public $name;
9
public $picture;
10
public $link;
11
public $access_token;
12
public $can_post = false;
13
public $likes;
14
public $fan_count;
15
16
public $provider;
17
public $raw_response;
18
19
20
/**
21
* Create a new Page object based on an array of attributes and a mapping
22
* from those attributes to the Profile object's attributes.
23
* The $mapping array should have this format (example for Facebook Page):
24
* $mapping = [
25
* 'id' => 'id',
26
* 'email' => 'email',
27
* 'name' => 'name',
28
* 'first_name' => 'first_name',
29
* 'middle_name' => 'middle_name',
30
* 'last_name' => 'last_name',
31
* 'username' => 'username',
32
* 'link' => 'link'
33
* ];
34
* The keys are the name of the Page object attributes, while the values
35
* are the key of that attribute in the $attributes array. Like so:
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.