| @@ -53,7 +53,7 @@ | ||
| 53 | 53 |              ['{{Ouvrage | 
| 54 | 54 | | langue=fr | 
| 55 | 55 | }}', | 
| 56 | - "\n | ", | |
| 56 | + "\n | ", | |
| 57 | 57 | ], | 
| 58 | 58 | ]; | 
| 59 | 59 | } | 
| @@ -76,7 +76,7 @@ | ||
| 76 | 76 | } | 
| 77 | 77 | |
| 78 | 78 | // note : multi-records filtered in BnFMapper | 
| 79 | -        $nbResults = (int)$xml->xpath('//srw:numberOfRecords[1]')[0] ?? 0; | |
| 79 | +        $nbResults = (int) $xml->xpath('//srw:numberOfRecords[1]')[0] ?? 0; | |
| 80 | 80 |          if (0 === $nbResults) { | 
| 81 | 81 | return null; | 
| 82 | 82 | } | 
| @@ -60,14 +60,14 @@ | ||
| 60 | 60 | */ | 
| 61 | 61 | $data = $this->mapping($volume); | 
| 62 | 62 | |
| 63 | -        if(isset($data['infos'])) { | |
| 63 | +        if (isset($data['infos'])) { | |
| 64 | 64 | $infos = $data['infos']; | 
| 65 | 65 | unset($data['infos']); | 
| 66 | 66 | } | 
| 67 | 67 | |
| 68 | 68 |          try { | 
| 69 | 69 | $this->ouvrage->hydrate($data); | 
| 70 | -            if(isset($infos)) { | |
| 70 | +            if (isset($infos)) { | |
| 71 | 71 | $this->ouvrage->setInfos($infos); | 
| 72 | 72 | } | 
| 73 | 73 |          } catch (Throwable $e) { | 
| @@ -41,7 +41,7 @@ | ||
| 41 | 41 | $res = $this->searchByISNI($infos['ISNIAuteur1']); | 
| 42 | 42 | } | 
| 43 | 43 |          if (isset($infos['isbn'])) { | 
| 44 | -            if(!empty($res)) { | |
| 44 | +            if (!empty($res)) { | |
| 45 | 45 | sleep(2); | 
| 46 | 46 | } | 
| 47 | 47 | $res = array_merge($res ?? [], $this->findArticleByISBN13($infos['isbn'])); | 
| @@ -69,7 +69,7 @@ discard block | ||
| 69 | 69 | $result[$tplName][$inc] += ['model' => $tplObject]; | 
| 70 | 70 | } | 
| 71 | 71 | |
| 72 | - return (array)$result; | |
| 72 | + return (array) $result; | |
| 73 | 73 | } | 
| 74 | 74 | |
| 75 | 75 | /** | 
| @@ -188,7 +188,7 @@ discard block | ||
| 188 | 188 |          ) { | 
| 189 | 189 | array_walk( | 
| 190 | 190 | $matches, | 
| 191 | -                function (&$value) { | |
| 191 | +                function(&$value) { | |
| 192 | 192 |                      $value = str_replace(['CURLYBRACKETO', 'CURLYBRACKETC'], ['{', '}'], $value); | 
| 193 | 193 | } | 
| 194 | 194 | ); | 
| @@ -248,7 +248,7 @@ discard block | ||
| 248 | 248 | } | 
| 249 | 249 | // No param name => take $keyNum as param name | 
| 250 | 250 |              if (false === $pos) { | 
| 251 | - $param = (string)$keyNum; | |
| 251 | + $param = (string) $keyNum; | |
| 252 | 252 | $value = $line; | 
| 253 | 253 | ++$keyNum; | 
| 254 | 254 | } | 
| @@ -36,7 +36,7 @@ | ||
| 36 | 36 | $channel->basic_qos(null, 1, null); | 
| 37 | 37 | // callback to $this->msgProcess(). | 
| 38 | 38 | // TODO check Rector refac | 
| 39 | -        $channel->basic_consume(static::QUEUE_NAME, '', false, false, false, false, function (\PhpAmqpLib\Message\AMQPMessage $msg) : void { | |
| 39 | +        $channel->basic_consume(static::QUEUE_NAME, '', false, false, false, false, function(\PhpAmqpLib\Message\AMQPMessage $msg) : void { | |
| 40 | 40 | $this->msgProcess($msg); | 
| 41 | 41 | }); | 
| 42 | 42 | |
| @@ -59,7 +59,7 @@ | ||
| 59 | 59 |      { | 
| 60 | 60 | // Style "auto1234" | 
| 61 | 61 |          if (empty($this->getParam('périodique') || empty($this->getParam('date')))) { | 
| 62 | - return 'auto'.(string)random_int(1000, 9999); | |
| 62 | + return 'auto'.(string) random_int(1000, 9999); | |
| 63 | 63 | } | 
| 64 | 64 | // Style "LeMonde15022017" | 
| 65 | 65 | $periodique = str_replace( | 
| @@ -51,7 +51,7 @@ | ||
| 51 | 51 |              $id .= ($this->getParam('nom'.$i)) ?? $this->getParam('auteur'.$i) ?? ''; | 
| 52 | 52 | } | 
| 53 | 53 | |
| 54 | -        return $id . ($this->getParam('année') ?? ''); | |
| 54 | +        return $id.($this->getParam('année') ?? ''); | |
| 55 | 55 | } | 
| 56 | 56 | |
| 57 | 57 | } | 
| @@ -94,7 +94,7 @@ discard block | ||
| 94 | 94 | $string .= "\n"; | 
| 95 | 95 | } | 
| 96 | 96 | |
| 97 | - return $string . '}}'; | |
| 97 | + return $string.'}}'; | |
| 98 | 98 | } | 
| 99 | 99 | |
| 100 | 100 | /** | 
| @@ -269,7 +269,7 @@ discard block | ||
| 269 | 269 | // Gestion alias | 
| 270 | 270 |          if (!$this->isValidParamName($name)) { | 
| 271 | 271 | // hack : 1 => "ouvrage collectif" | 
| 272 | - $name = (string)$name; | |
| 272 | + $name = (string) $name; | |
| 273 | 273 | $this->log[] = "parameter $name not found"; | 
| 274 | 274 | |
| 275 | 275 | // todo keep there |