@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | { |
| 91 | 91 | $element = $this->xml->xpath($path); |
| 92 | 92 | if (isset($element[0]) && $element[0] instanceof SimpleXMLElement) { |
| 93 | - return (string)$element[0]; |
|
| 93 | + return (string) $element[0]; |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | return null; |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | { |
| 107 | 107 | $raw = $this->xpath2string('//mxc:datafield[@tag="215"]/mxc:subfield[@code="a"]'); |
| 108 | 108 | if (!empty($raw) && preg_match('#([0-9]{2,}) p\.#', $raw, $matches) > 0) { |
| 109 | - return (string)$matches[1]; |
|
| 109 | + return (string) $matches[1]; |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | return null; |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | $raw = $this->xpath2string('//srw:recordIdentifier[1]/text()'); |
| 191 | 191 | |
| 192 | 192 | if ($raw && preg_match('#ark:/[0-9]+/cb([0-9]+)#', $raw, $matches) > 0) { |
| 193 | - return (string)$matches[1]; |
|
| 193 | + return (string) $matches[1]; |
|
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | return null; |
@@ -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.'}}', |
@@ -132,8 +132,7 @@ |
||
| 132 | 132 | |
| 133 | 133 | private function onlineIsbnSearch(string $isbn, ?string $isbn10 = null) |
| 134 | 134 | { |
| 135 | - online: |
|
| 136 | - echo "sleep 20...\n"; |
|
| 135 | + online : echo "sleep 20...\n"; |
|
| 137 | 136 | sleep(40); |
| 138 | 137 | |
| 139 | 138 | try { |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | $string .= $paramValue; |
| 327 | 327 | } |
| 328 | 328 | // expanded model -> "\n}}" |
| 329 | - if($this->userSeparator && strpos($this->userSeparator,"\n") !== false ) { |
|
| 329 | + if ($this->userSeparator && strpos($this->userSeparator, "\n") !== false) { |
|
| 330 | 330 | $string .= "\n"; |
| 331 | 331 | } |
| 332 | 332 | $string .= '}}'; |
@@ -408,9 +408,9 @@ discard block |
||
| 408 | 408 | |
| 409 | 409 | // Add a note in HTML commentary |
| 410 | 410 | foreach ($errorUserData as $param => $value) { |
| 411 | - if(1 === intval($param)) { |
|
| 411 | + if (1 === intval($param)) { |
|
| 412 | 412 | $errorUserData[$param] = $value." <!--VALEUR SANS NOM DE PARAMETRE -->"; |
| 413 | - }else{ |
|
| 413 | + } else { |
|
| 414 | 414 | $errorUserData[$param] = $value." <!--PARAMETRE '$param' N'EXISTE PAS -->"; |
| 415 | 415 | } |
| 416 | 416 | } |