Raw   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 5
Bugs 0 Features 0
Metric Value
wmc 5
c 5
b 0
f 0
lcom 0
cbo 2
dl 0
loc 28
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B call() 0 11 5
1
<?php
2
3
/*
4
 * This file is part of the Rutube PHP API Client package.
5
 *
6
 * (c) Rutube
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Rutube;
13
14
/**
15
 * Реализация прямых запросов к API
16
 *
17
 * @package Rutube
18
 */
19
class Raw extends Entity
20
{
21
    /**
22
     * Прямой запрос к API Rutube
23
     *
24
     * @param string $method Метод: GET, POST, PUT, PATCH, DELETE
25
     * @param string $url URL метода API, например: api/video/person/
26
     * @param array $options Параметры запроса:
27
     *                          [
28
     *                              'params'=>[],
29
     *                              'query'=>[],
30
     *                              'file'=>[],
31
     *                              'return_code'=>false
32
     *                          ]
33
     * @return mixed
34
     */
35
    public function call($method, $url, $options = array())
36
    {
37
        return $this->getTransport()->call(
38
            $method,
39
            $url,
40
            isset($options['params']) ? $options['params'] : array(),
41
            isset($options['query']) ? $options['query'] : array(),
42
            isset($options['file']) ? $options['file'] : array(),
43
            isset($options['return_code']) ? $options['return_code'] : false
44
        );
45
    }
46
}
47