Total Complexity | 5 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
17 | class Sesame |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * Sesame constructor |
||
22 | */ |
||
23 | public function __construct() |
||
24 | { |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * crawlArticle |
||
29 | * |
||
30 | * @param string $responseBody |
||
31 | * @param bool $crawlVariations |
||
32 | * @return Article |
||
33 | */ |
||
34 | public function crawlArticle(string $responseBody, bool $crawlVariations): Article |
||
35 | { |
||
36 | $crawler = new ArticleCrawler(); |
||
37 | |||
38 | return $crawler->crawlArticle($responseBody, $crawlVariations); |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * renderArticle |
||
43 | * |
||
44 | * @param Article $article |
||
45 | * @param string $format |
||
46 | * @return string |
||
47 | */ |
||
48 | public function renderArticle(Article $article, string $format = 'json'): string |
||
59 | } |
||
60 | } |
||
61 |