GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Lead   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 7
Bugs 0 Features 0
Metric Value
wmc 3
c 7
b 0
f 0
lcom 0
cbo 3
dl 0
loc 43
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getEndpoint() 0 4 1
A init() 0 6 1
A save() 0 22 1
1
<?php
2
3
namespace prgTW\BaseCRM\Service;
4
5
use prgTW\BaseCRM\Resource\InstanceResource;
6
use prgTW\BaseCRM\Service\Behavior\CustomFieldsTrait;
7
use prgTW\BaseCRM\Service\Behavior\TaggableTrait;
8
9
/**
10
 * @method Tags getTaggings()
11
 */
12
class Lead extends InstanceResource
13
{
14
	use TaggableTrait;
15
	use CustomFieldsTrait;
16
17
	/** {@inheritdoc} */
18
	protected function getEndpoint()
19
	{
20
		return self::ENDPOINT_LEADS;
21
	}
22
23
	/** {@inheritdoc} */
24
	protected function init()
25
	{
26
		$this->setSubResources([
27
			Tags::class => 'taggings',
28
		]);
29
	}
30
31
	/** {@inheritdoc} */
32
	public function save(array $fieldNames = [])
33
	{
34
		$fieldNames = array_intersect($fieldNames, [
35
			'first_name',
36
			'last_name',
37
			'company_name',
38
			'email',
39
			'phone',
40
			'mobile',
41
			'twitter',
42
			'skype',
43
			'facebook',
44
			'linkedin',
45
			'address',
46
			'city',
47
			'country',
48
			'title',
49
			'description',
50
		]);
51
52
		return parent::save($fieldNames);
53
	}
54
}
55