TasksArchiveRequest::listTasks()   A
last analyzed

Complexity

Conditions 3
Paths 4

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 4
nc 4
nop 1
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * This class is generated using the package carono/codegen
5
 */
6
7
namespace carono\etxtru\request;
8
9
class TasksArchiveRequest extends \carono\etxtru\RequestAbstract
10
{
11
	/**
12
	 * Возвращает список архивных заказов текущего пользователя, только для заказчика.
13
	 *
14
	 * @param \carono\etxtru\config\TasksArchiveListTasksConfig|array $config
15
	 * @return \carono\etxtru\response\ListTasksResponse|\stdClass
16
	 */
17
	public function listTasks($config)
18
	{
19
		$params = [];
20
		foreach ($config instanceof \carono\etxtru\ConfigAbstract ? $config->toArray() : $config as $key => $value) {
21
		    $params[$key] = $value;
22
		}
23
		return $this->getClient()->getContent('tasks_archive.listTasks', $params, 'carono\etxtru\response\ListTasksResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...nse\ListTasksResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\ListTasksResponse|stdClass.
Loading history...
24
	}
25
26
27
	/**
28
	 * Функция получения результатов по архивному заказу, только для заказчика.
29
	 *
30
	 * @param int $id Идентификатор заказа, обязательный параметр
31
	 * @return \carono\etxtru\response\GetResultsResponse|\stdClass
32
	 */
33
	public function getResults($id)
34
	{
35
		$params = [
36
			'id' => $id
37
		];
38
		return $this->getClient()->getContent('tasks_archive.getResults', $params, 'carono\etxtru\response\GetResultsResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...se\GetResultsResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\GetResultsResponse|stdClass.
Loading history...
39
	}
40
}
41