1 | <?php |
||
17 | class ErrorDetector |
||
18 | { |
||
19 | /** |
||
20 | * @param ResponseInterface $response |
||
21 | * @param string $path |
||
22 | * @param array $options |
||
23 | * |
||
24 | * @return string |
||
25 | */ |
||
26 | 7 | public function detect(ResponseInterface $response, $path, array $options = []) |
|
47 | |||
48 | /** |
||
49 | * @param string $content |
||
50 | * |
||
51 | * @return bool |
||
52 | */ |
||
53 | 6 | private function isBanned($content) |
|
60 | |||
61 | /** |
||
62 | * Return anime Akira page if anime not found. |
||
63 | * |
||
64 | * @see http://www.world-art.ru/animation/animation.php?id=10000000 |
||
65 | * |
||
66 | * @param string $content |
||
67 | * @param string $path |
||
68 | * @param array $options |
||
69 | * |
||
70 | * @return int |
||
71 | */ |
||
72 | 4 | private function isAkiraSubstitution($content, $path, array $options) |
|
86 | |||
87 | /** |
||
88 | * Is not a Akira. |
||
89 | * |
||
90 | * @see http://www.world-art.ru/animation/animation.php?id=1 |
||
91 | * |
||
92 | * @param int $id |
||
93 | * @param string $content |
||
94 | * |
||
95 | * @return bool |
||
96 | */ |
||
97 | 4 | private function isNotAkira($id, $content) |
|
101 | } |
||
102 |