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.

Contact   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 6
Bugs 0 Features 0
Metric Value
wmc 3
c 6
b 0
f 0
lcom 0
cbo 4
dl 0
loc 53
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getEndpoint() 0 4 1
A init() 0 9 1
B save() 0 28 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\NoteableTrait;
8
use prgTW\BaseCRM\Service\Behavior\RemindableTrait;
9
10
/**
11
 * @method Notes getNotes()
12
 * @method Reminders getReminders()
13
 */
14
class Contact extends InstanceResource
15
{
16
	use NoteableTrait;
17
	use RemindableTrait;
18
	use CustomFieldsTrait;
19
20
	/** {@inheritdoc} */
21
	protected function getEndpoint()
22
	{
23
		return self::ENDPOINT_SALES;
24
	}
25
26
	/** {@inheritdoc} */
27
	protected function init()
28
	{
29
		$this->setSubResources([
30
			Contacts::class,
31
			Deals::class,
32
			Notes::class,
33
			Reminders::class,
34
		]);
35
	}
36
37
	/** {@inheritdoc} */
38
	public function save(array $fieldNames = [])
39
	{
40
		$fieldNames = array_intersect($fieldNames, [
41
			'name',
42
			'last_name',
43
			'first_name',
44
			'contact_id',
45
			'email',
46
			'phone',
47
			'mobile',
48
			'twitter',
49
			'skype',
50
			'facebook',
51
			'linkedin',
52
			'address',
53
			'city',
54
			'country',
55
			'title',
56
			'description',
57
			'industry',
58
			'website',
59
			'fax',
60
			'tag_list',
61
			'private',
62
		]);
63
64
		return parent::save($fieldNames);
65
	}
66
}
67