| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 16 | 
| Code Lines | 12 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 18 | public function process($jsonLD): array | ||
| 19 |     { | ||
| 20 | return [ | ||
| 21 | 'DATA-TYPE' => 'JSON-LD', | ||
| 22 | 'DATA-ARTICLE' => $jsonLD['@type'] === 'NewsArticle', | ||
| 23 | |||
| 24 | 'périodique' => $this->clean($jsonLD['publisher']['name'] ?? null), | ||
| 25 | 'titre' => $this->clean($jsonLD['headline']), // obligatoire | ||
| 26 | 'url' => $jsonLD['url'] ?? $jsonLD['mainEntityOfPage']['@id'] ?? null, | ||
| 27 | 'date' => $this->convertDate($jsonLD['datePublished'] ?? $jsonLD['dateCreated'] ?? null), // | ||
| 28 | // 2020-03-19T19:13:01.000Z | ||
| 29 | 'auteur1' => $this->wikifyPressAgency($this->convertAuteur($jsonLD, 0)), | ||
| 30 | 'auteur2' => $this->convertAuteur($jsonLD, 1), | ||
| 31 | 'auteur3' => $this->convertAuteur($jsonLD, 2), | ||
| 32 | 'auteur institutionnel' => $this->convertInstitutionnel($jsonLD), | ||
| 33 | 'url-access' => $this->convertURLaccess($jsonLD), | ||
| 34 | ]; | ||
| 37 |