| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 15 | 
| Code Lines | 8 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 43 | protected function getReport($client)  | 
            ||
| 44 |     { | 
            ||
| 45 | $service = new GoogleAnalyticsReportService($client);  | 
            ||
| 46 | |||
| 47 | $reports = $service->getReport();  | 
            ||
| 48 | $count = 0;  | 
            ||
| 49 | |||
| 50 | $updateService = new PageUpdateService();  | 
            ||
| 51 | /** @var array $rows */  | 
            ||
| 52 |         foreach ($reports as $report) { | 
            ||
| 53 | /** @var array $rows */  | 
            ||
| 54 | $rows = $report->getData()->getRows();  | 
            ||
| 55 | $count += $updateService->updateVisits($rows);  | 
            ||
| 56 | }  | 
            ||
| 57 | echo "<p>$count Pages updated with Google Analytics visit count</p>";  | 
            ||
| 58 | }  | 
            ||
| 60 |