Completed
Push — master ( 5e8ba0...5ef40e )
by dotzero
10s
created

Links   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 22
ccs 0
cts 5
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A apiList() 0 6 2
1
<?php
2
3
namespace AmoCRM\Models;
4
5
/**
6
 * Class Links
7
 *
8
 * Класс модель для работы со Связями между сущностями
9
 *
10
 * @package AmoCRM\Models
11
 * @author [email protected]
12
 * @link https://github.com/dotzero/amocrm-php
13
 *
14
 * For the full copyright and license information, please view the LICENSE
15
 * file that was distributed with this source code.
16
 */
17
class Links extends AbstractModel
18
{
19
    /**
20
     * @var array Список доступный полей для модели (исключая кастомные поля)
21
     */
22
    protected $fields = [];
23
24
    /**
25
     * Связи между сущностями
26
     *
27
     * Метод для получения связей между сущностями аккаунта.
28
     * @link https://developers.amocrm.ru/rest_api/links/list.php
29
     * @param array $parameters Массив параметров к amoCRM API
30
     * @return array Ответ amoCRM API
31
     */
32
    public function apiList($parameters)
33
    {
34
        $response = $this->getRequest('/private/api/v2/json/links/list', $parameters);
35
36
        return isset($response['links']) ? $response['links'] : [];
37
    }
38
}
39