@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | { |
55 | 55 | $data = $this->getFileData(); |
56 | 56 | $this->lastDate = new DateTime($data['date'], new DateTimeZone(static::REBOOT_TIMEZONE)); |
57 | - $this->count = (int)$data['count']; |
|
57 | + $this->count = (int) $data['count']; |
|
58 | 58 | |
59 | 59 | // Today reboot date/time of the quota |
60 | 60 | $todayBoot = new DateTime(); |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | try { |
78 | 78 | $json = file_get_contents(static::JSON_FILENAME); |
79 | - $array = (array)json_decode($json, true); |
|
79 | + $array = (array) json_decode($json, true); |
|
80 | 80 | } catch (Throwable $e) { |
81 | 81 | throw new ConfigException('Error on Google Quota file : reading or JSON malformed.'); |
82 | 82 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | const REQUIRED_PARAMETERS = ['titre', 'url']; |
22 | 22 | |
23 | 23 | const MINIMUM_PARAMETERS |
24 | - = [ |
|
24 | + = [ |
|
25 | 25 | // 'langue' => '', // suggéré |
26 | 26 | 'titre' => '', // required |
27 | 27 | 'url' => '', // required |
@@ -151,7 +151,7 @@ |
||
151 | 151 | protected function isValidParamName($name): bool |
152 | 152 | { |
153 | 153 | if (is_int($name)) { |
154 | - $name = (string)$name; |
|
154 | + $name = (string) $name; |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | // that parameter exists in template ? |
@@ -270,7 +270,7 @@ |
||
270 | 270 | // Gestion alias |
271 | 271 | if (!$this->isValidParamName($name)) { |
272 | 272 | // hack : 1 => "ouvrage collectif" |
273 | - $name = (string)$name; |
|
273 | + $name = (string) $name; |
|
274 | 274 | $this->log[] = "parameter $name not found"; |
275 | 275 | |
276 | 276 | // todo keep there |
@@ -111,7 +111,7 @@ |
||
111 | 111 | $data[] = ['title' => $title, 'template' => $template]; |
112 | 112 | } |
113 | 113 | |
114 | - return (array)$data; |
|
114 | + return (array) $data; |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | /** |
@@ -152,7 +152,7 @@ |
||
152 | 152 | $page .= '–'.$meta['citation_lastpage']; |
153 | 153 | } |
154 | 154 | |
155 | - return (string)$page; |
|
155 | + return (string) $page; |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | return null; |
@@ -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 | } |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | if (count($res) >= 2 && empty($auteur2)) { |
188 | 188 | // delete author-params |
189 | 189 | array_map( |
190 | - function ($param) { |
|
190 | + function($param) { |
|
191 | 191 | $this->unsetParam($param); |
192 | 192 | }, |
193 | 193 | ['auteur', 'auteurs', 'prénom1', 'nom1'] |
@@ -539,7 +539,7 @@ discard block |
||
539 | 539 | // todo bug {{citation bloc}} si "=" ou "|" dans texte de citation |
540 | 540 | // Legacy : use {{début citation}} ... {{fin citation}} |
541 | 541 | if (preg_match('#[=|]#', $extrait) > 0) { |
542 | - $this->optiTemplate->externalTemplates[] = (object)[ |
|
542 | + $this->optiTemplate->externalTemplates[] = (object) [ |
|
543 | 543 | 'template' => 'début citation', |
544 | 544 | '1' => '', |
545 | 545 | 'raw' => '{{Début citation}}'.$extrait.'{{Fin citation}}', |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | $this->notCosmetic = true; |
549 | 549 | } else { |
550 | 550 | // StdClass |
551 | - $this->optiTemplate->externalTemplates[] = (object)[ |
|
551 | + $this->optiTemplate->externalTemplates[] = (object) [ |
|
552 | 552 | 'template' => 'citation bloc', |
553 | 553 | '1' => $extrait, |
554 | 554 | 'raw' => '{{Citation bloc|'.$extrait.'}}', |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | // "commentaire=bla" => {{Commentaire biblio|1=bla}} |
565 | 565 | if ($this->hasParamValue('commentaire')) { |
566 | 566 | $commentaire = $this->getParam('commentaire'); |
567 | - $this->optiTemplate->externalTemplates[] = (object)[ |
|
567 | + $this->optiTemplate->externalTemplates[] = (object) [ |
|
568 | 568 | 'template' => 'commentaire biblio', |
569 | 569 | '1' => $commentaire, |
570 | 570 | 'raw' => '{{Commentaire biblio|'.$commentaire.'}}', |