Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | public function process($data): array |
||
24 | { |
||
25 | if(!isset($data['JSON-LD'])) { |
||
26 | return []; |
||
27 | } |
||
28 | $data = $data['JSON-LD']; |
||
29 | |||
30 | return [ |
||
31 | // 'langue' => 'fr', |
||
32 | 'périodique' => '[[Libération (journal)|Libération]]', |
||
33 | // 'acces' => $data['isAccessibleForFree'], |
||
34 | 'titre' => html_entity_decode($data['headline'] ?? null), |
||
35 | 'lire en ligne' => $data['mainEntityOfPage']['@id'], |
||
36 | 'date' => $this->convertDate($data['dateCreated']), // "2017-11-17T20:06:13" |
||
37 | 'auteur1' => $this->convertAuteur($data, 0), |
||
38 | 'auteur2' => $this->convertAuteur($data, 1), |
||
39 | 'auteur3' => $this->convertAuteur($data, 2), |
||
40 | 'auteur institutionnel' => $this->convertInstitutionnel($data), |
||
41 | ]; |
||
45 |