Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
56 | protected function countEntity($entity) |
||
57 | { |
||
58 | $request = $this->getRequest(); |
||
59 | $response = $request->get('catalog/seo_sitemap/' . $entity); |
||
60 | $responseBody = $response->getBody()->getContents(); |
||
61 | $match = $request->findMatchInResponse($responseBody, '/-?[0-9]+[a-z0-9- ]+ of ([0-9]+)/'); |
||
62 | if (!$match) { |
||
63 | $match = $request->findMatchInResponse($responseBody, '/([0-9]+) Item\(s\)/'); |
||
64 | } |
||
65 | return $match; |
||
66 | } |
||
67 | } |
||
68 |