ArticlesArchiveRequest::getList()   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 ArticlesArchiveRequest extends \carono\etxtru\RequestAbstract
10
{
11
	/**
12
	 * Возвращает список купленных пользователм статей и перенесенных в архив статей.
13
	 *
14
	 * @param \carono\etxtru\config\ArticlesArchiveGetListConfig|array $config
15
	 * @return \carono\etxtru\response\GetListResponse|\stdClass
16
	 */
17
	public function getList($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('articles_archive.getList', $params, 'carono\etxtru\response\GetListResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...ponse\GetListResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\GetListResponse|stdClass.
Loading history...
24
	}
25
26
27
	/**
28
	 * Функция выводит тексты запрошенных статей из архива текущего пользователя
29
	 *
30
	 * @param array (int var1, int var2, ...) $id Массив идентификаторов статей в архиве
0 ignored issues
show
Documentation Bug introduced by
The doc comment (int at position 1 could not be parsed: Expected ')' at position 1, but found 'int'.
Loading history...
31
	 * @return \carono\etxtru\response\GetTextResponse|\stdClass
32
	 */
33
	public function getText($id)
34
	{
35
		$params = [
36
			'id' => $id
37
		];
38
		return $this->getClient()->getContent('articles_archive.getText', $params, 'carono\etxtru\response\GetTextResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...ponse\GetTextResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\GetTextResponse|stdClass.
Loading history...
39
	}
40
41
42
	/**
43
	 * Функция создает zip архив с текстами и изображениями указанных статей из архива для текущего
44
	 * пользователя
45
	 *
46
	 * @param array (int var1, int var2, ...) $id Массив идентификаторов статей из архива
0 ignored issues
show
Documentation Bug introduced by
The doc comment (int at position 1 could not be parsed: Expected ')' at position 1, but found 'int'.
Loading history...
47
	 * @return \carono\etxtru\response\DownloadResponse|\stdClass
48
	 */
49
	public function download($id)
50
	{
51
		$params = [
52
			'id' => $id
53
		];
54
		return $this->getClient()->getContent('articles_archive.download', $params, 'carono\etxtru\response\DownloadResponse');
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getClient(...onse\DownloadResponse') also could return the type carono\etxtru\Response which is incompatible with the documented return type carono\etxtru\response\DownloadResponse|stdClass.
Loading history...
55
	}
56
}
57