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.

Deal::init()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
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 Contacts getContacts()
12
 */
13
class Deal extends InstanceResource
14
{
15
	use NoteableTrait;
16
	use RemindableTrait;
17
	use CustomFieldsTrait;
18
19
	/** {@inheritdoc} */
20
	protected function getEndpoint()
21
	{
22
		return self::ENDPOINT_SALES;
23
	}
24
25
	/** {@inheritdoc} */
26
	protected function init()
27
	{
28
		$this->setSubResources([
29
			Contacts::class,
30
		]);
31
	}
32
33
	/** {@inheritdoc} */
34 View Code Duplication
	public function save(array $fieldNames = [])
0 ignored issues
show
Duplication introduced by
This method 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...
35
	{
36
		$fieldNames = array_intersect($fieldNames, [
37
			'name',
38
			'entity_id',
39
			'scope',
40
			'hot',
41
			'deal_tags',
42
			'contact_ids',
43
			'source_id',
44
			'stage',
45
		]);
46
47
		return parent::save($fieldNames);
48
	}
49
}
50