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