Total Complexity | 9 |
Total Lines | 90 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
10 | class PictureModel extends MainModel |
||
11 | { |
||
12 | /** |
||
13 | * Type of info. Either anime or manga. |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | private $_type; |
||
18 | |||
19 | /** |
||
20 | * Id of the anime or manga. |
||
21 | * |
||
22 | * @var string|int |
||
23 | */ |
||
24 | private $_id; |
||
25 | |||
26 | /** |
||
27 | * Default constructor. |
||
28 | * |
||
29 | * @param string $type |
||
30 | * @param string|int $id |
||
31 | * @param string $parserArea |
||
32 | * |
||
33 | * @return void |
||
34 | */ |
||
35 | public function __construct($type, $id, $parserArea = '.js-scrollfix-bottom-rel') |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * Default call. |
||
47 | * |
||
48 | * @param string $method |
||
49 | * @param array $arguments |
||
50 | * |
||
51 | * @return array|string|int |
||
52 | */ |
||
53 | public function __call($method, $arguments) |
||
54 | { |
||
55 | if ($this->_error) { |
||
56 | return $this->_error; |
||
57 | } |
||
58 | |||
59 | return call_user_func_array([$this, $method], $arguments); |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * Get type (anime or manga). |
||
64 | * |
||
65 | * @return string |
||
66 | */ |
||
67 | private function getType() |
||
70 | } |
||
71 | |||
72 | /** |
||
73 | * Get anime/manga id. |
||
74 | * |
||
75 | * @return string |
||
76 | */ |
||
77 | private function getId() |
||
80 | } |
||
81 | |||
82 | /** |
||
83 | * Get anime/manga additional pictures. |
||
84 | * |
||
85 | * @return array |
||
86 | */ |
||
87 | private function getAllInfo() |
||
100 | } |
||
101 | } |
||
102 |