Creatives   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 37
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A get() 0 16 1
1
<?php
2
/**
3
 * @project yandex-direct-client
4
 */
5
6
namespace Yandex\Direct\Service;
7
8
use DOMDocument;
9
use ReflectionException;
10
use Yandex\Direct\Exception\ErrorResponseException;
11
use Yandex\Direct\Exception\Exception;
12
use Yandex\Direct\Service;
13
use function Yandex\Direct\get_param_names;
14
15
/**
16
 * Возвращает параметры креативов, отвечающих заданным критериям.
17
 *
18
 * @see https://yandex.ru/dev/direct/doc/ref-v5/creatives/creatives-docpage/
19
 */
20
final class Creatives extends Service
21
{
22
    /**
23
     * Возвращает параметры креативов, отвечающих заданным критериям.
24
     *
25
     * @param array $SelectionCriteria
26
     * @param array $FieldNames
27
     * @param array $VideoExtensionCreativeFieldNames
28
     * @param array $CpcVideoCreativeFieldNames
29
     * @param array $CpmVideoCreativeFieldNames
30
     * @param array $SmartCreativeFieldNames
31
     * @param array $Page
32
     * @return array|DOMDocument
33
     *
34
     * @throws ErrorResponseException
35
     * @throws Exception
36
     * @throws ReflectionException
37
     *
38
     * @see https://yandex.ru/dev/direct/doc/ref-v5/creatives/get-docpage/
39
     */
40
    public function get(
41
        $SelectionCriteria,
42
        $FieldNames,
43
        $VideoExtensionCreativeFieldNames = null,
44
        $CpcVideoCreativeFieldNames = null,
45
        $CpmVideoCreativeFieldNames = null,
46
        $SmartCreativeFieldNames = null,
47
        $Page = null
48
    ) {
49
        $params = compact(get_param_names(__METHOD__));
50
51
        return $this->request([
52
            'method' => 'get',
53
            'params' => $params
54
        ]);
55
    }
56
}
57