@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | if (count($res) >= 2 && empty($auteur2)) { |
| 163 | 163 | // delete author-params |
| 164 | 164 | array_map( |
| 165 | - function ($param) { |
|
| 165 | + function($param) { |
|
| 166 | 166 | $this->unsetParam($param); |
| 167 | 167 | }, |
| 168 | 168 | ['auteur', 'auteurs', 'prénom1', 'nom1'] |
@@ -599,7 +599,7 @@ discard block |
||
| 599 | 599 | // todo detect duplication ouvrage/plume dans externalTemplate ? |
| 600 | 600 | if (!empty($this->getParam('plume'))) { |
| 601 | 601 | $plumeValue = $this->getParam('plume'); |
| 602 | - $this->ouvrage->externalTemplates[] = (object)[ |
|
| 602 | + $this->ouvrage->externalTemplates[] = (object) [ |
|
| 603 | 603 | 'template' => 'plume', |
| 604 | 604 | '1' => $plumeValue, |
| 605 | 605 | 'raw' => '{{nobr|. {{plume}}}}', |
@@ -614,7 +614,7 @@ discard block |
||
| 614 | 614 | // todo bug {{citation bloc}} si "=" ou "|" dans texte de citation |
| 615 | 615 | // Legacy : use {{début citation}} ... {{fin citation}} |
| 616 | 616 | if (preg_match('#[=|]#', $extrait) > 0) { |
| 617 | - $this->ouvrage->externalTemplates[] = (object)[ |
|
| 617 | + $this->ouvrage->externalTemplates[] = (object) [ |
|
| 618 | 618 | 'template' => 'début citation', |
| 619 | 619 | '1' => '', |
| 620 | 620 | 'raw' => '{{début citation}}'.$extrait.'{{fin citation}}', |
@@ -623,7 +623,7 @@ discard block |
||
| 623 | 623 | $this->notCosmetic = true; |
| 624 | 624 | } else { |
| 625 | 625 | // StdClass |
| 626 | - $this->ouvrage->externalTemplates[] = (object)[ |
|
| 626 | + $this->ouvrage->externalTemplates[] = (object) [ |
|
| 627 | 627 | 'template' => 'citation bloc', |
| 628 | 628 | '1' => $extrait, |
| 629 | 629 | 'raw' => '{{extrait|'.$extrait.'}}', |
@@ -639,7 +639,7 @@ discard block |
||
| 639 | 639 | // "commentaire=bla" => {{Commentaire biblio|1=bla}} |
| 640 | 640 | if (!empty($this->getParam('commentaire'))) { |
| 641 | 641 | $commentaire = $this->getParam('commentaire'); |
| 642 | - $this->ouvrage->externalTemplates[] = (object)[ |
|
| 642 | + $this->ouvrage->externalTemplates[] = (object) [ |
|
| 643 | 643 | 'template' => 'commentaire biblio', |
| 644 | 644 | '1' => $commentaire, |
| 645 | 645 | 'raw' => '{{commentaire biblio|'.$commentaire.'}}', |
@@ -801,7 +801,7 @@ discard block |
||
| 801 | 801 | if (isset($editeurUrl) && $editeurUrl !== $editeurStr) { |
| 802 | 802 | $newEditeur = '[['.$editeurUrl.'|'.$editeurStr.']]'; |
| 803 | 803 | } |
| 804 | - if (isset($editeurUrl) && $editeurUrl === $editeurStr ) { |
|
| 804 | + if (isset($editeurUrl) && $editeurUrl === $editeurStr) { |
|
| 805 | 805 | $newEditeur = '[['.$editeurStr.']]'; |
| 806 | 806 | } |
| 807 | 807 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | { |
| 99 | 99 | // todo verify/useless ? |
| 100 | 100 | if (is_int($name)) { |
| 101 | - $name = (string)$name; |
|
| 101 | + $name = (string) $name; |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | // that parameter exists in template ? |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | } catch (Throwable $e) { |
| 238 | 238 | unset($e); |
| 239 | 239 | // hack : 1 => "ouvrage collectif" |
| 240 | - $name = (string)$name; |
|
| 240 | + $name = (string) $name; |
|
| 241 | 241 | $this->log[] = "parameter $name not found"; |
| 242 | 242 | $this->parametersErrorFromHydrate[$name] = $value; |
| 243 | 243 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | 'titre' => $volume->title, |
| 41 | 41 | 'sous-titre' => $this->filterSubtitle($volume), |
| 42 | 42 | 'année' => $this->convertDate2Year($volume->publishedDate), |
| 43 | - 'pages totales' => (string)$volume->pageCount ?? null, |
|
| 43 | + 'pages totales' => (string) $volume->pageCount ?? null, |
|
| 44 | 44 | 'isbn' => $this->convertIsbn($volume), |
| 45 | 45 | 'présentation en ligne' => $this->presentationEnLigne($volume), |
| 46 | 46 | 'lire en ligne' => $this->lireEnLigne($volume), |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | return null; |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | - if( strlen($volume->subtitle) > 80 ) { |
|
| 62 | + if (strlen($volume->subtitle) > 80) { |
|
| 63 | 63 | return null; |
| 64 | 64 | } |
| 65 | 65 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | return null; |
| 78 | 78 | } |
| 79 | 79 | if (preg_match('/[^0-9]?([12][0-9]{3})[^0-9]?/', $data, $matches) > 0) { |
| 80 | - return (string)$matches[1]; |
|
| 80 | + return (string) $matches[1]; |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | return null; |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | // so isbn-13 replace isbn-10 |
| 97 | 97 | // todo refac algo (if 2x isbn13?) |
| 98 | 98 | $isbn = null; |
| 99 | - $ids = (array)$volume->industryIdentifiers; |
|
| 99 | + $ids = (array) $volume->industryIdentifiers; |
|
| 100 | 100 | foreach ($ids as $id) { |
| 101 | 101 | if (!isset($isbn) && in_array($id->type, ['ISBN_10', 'ISBN_13'])) { |
| 102 | 102 | $isbn = $id->identifier; |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $res = []; |
| 95 | 95 | foreach ($elements as $element) { |
| 96 | 96 | if (isset($element) && $element instanceof SimpleXMLElement) { |
| 97 | - $res[] = (string)$element; |
|
| 97 | + $res[] = (string) $element; |
|
| 98 | 98 | } |
| 99 | 99 | } |
| 100 | 100 | |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | { |
| 116 | 116 | $raw = $this->xpath2string('//mxc:datafield[@tag="215"]/mxc:subfield[@code="a"]'); |
| 117 | 117 | if (!empty($raw) && preg_match('#([0-9]{2,}) p\.#', $raw, $matches) > 0) { |
| 118 | - return (string)$matches[1]; |
|
| 118 | + return (string) $matches[1]; |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | return null; |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | $raw = $this->xpath2string('//srw:recordIdentifier[1]/text()'); |
| 199 | 199 | |
| 200 | 200 | if ($raw && preg_match('#ark:/[0-9]+/cb([0-9]+)#', $raw, $matches) > 0) { |
| 201 | - return (string)$matches[1]; |
|
| 201 | + return (string) $matches[1]; |
|
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | return null; |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | return null; |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - if(strlen($details['subtitle']) > 80 ) { |
|
| 49 | + if (strlen($details['subtitle']) > 80) { |
|
| 50 | 50 | return null; |
| 51 | 51 | } |
| 52 | 52 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | return null; |
| 92 | 92 | } |
| 93 | 93 | if (preg_match('/[^0-9]?([12][0-9]{3})[^0-9]?/', $details['publish_date'], $matches) > 0) { |
| 94 | - return (string)$matches[1]; |
|
| 94 | + return (string) $matches[1]; |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | return null; |