@@ -88,7 +88,7 @@ |
||
88 | 88 | // const TRADE = '™'; // ™ |
89 | 89 | // const REG = '®'; // ® |
90 | 90 | // const COPY = '©'; // © |
91 | - const ALL_SPACES = "\xE2\x80\xAF|\xC2\xAD|\xC2\xA0|\\s"; // Used in regexps. Better than \s |
|
91 | + const ALL_SPACES = "\xE2\x80\xAF|\xC2\xAD|\xC2\xA0|\\s"; // Used in regexps. Better than \s |
|
92 | 92 | |
93 | 93 | /** |
94 | 94 | * UTF8 first letter in upper case. |
@@ -111,7 +111,7 @@ |
||
111 | 111 | { |
112 | 112 | // Style "auto1234" |
113 | 113 | if (empty($this->getParam('périodique') || empty($this->getParam('date')))) { |
114 | - return 'auto'.(string)rand(1000, 9999); |
|
114 | + return 'auto'.(string) rand(1000, 9999); |
|
115 | 115 | } |
116 | 116 | // Style "LeMonde15022017" |
117 | 117 | $periodique = str_replace( |
@@ -52,7 +52,7 @@ |
||
52 | 52 | { |
53 | 53 | $data = $this->getFileData(); |
54 | 54 | $this->lastDate = new DateTime($data['date'], new DateTimeZone(static::REBOOT_TIMEZONE)); |
55 | - $this->count = (int)$data['count']; |
|
55 | + $this->count = (int) $data['count']; |
|
56 | 56 | |
57 | 57 | // Today reboot date/time of the quota |
58 | 58 | $todayBoot = new DateTime(); |
@@ -258,10 +258,10 @@ |
||
258 | 258 | unset($dat['dq']); |
259 | 259 | } |
260 | 260 | } |
261 | - if(empty($dat['q'])) { |
|
261 | + if (empty($dat['q'])) { |
|
262 | 262 | unset($dat['q']); |
263 | 263 | } |
264 | - if(empty($dat['dq'])) { |
|
264 | + if (empty($dat['dq'])) { |
|
265 | 265 | unset($dat['dq']); |
266 | 266 | } |
267 | 267 |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | { |
145 | 145 | // todo verify/useless ? |
146 | 146 | if (is_int($name)) { |
147 | - $name = (string)$name; |
|
147 | + $name = (string) $name; |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | // that parameter exists in template ? |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | } catch (Throwable $e) { |
268 | 268 | unset($e); |
269 | 269 | // hack : 1 => "ouvrage collectif" |
270 | - $name = (string)$name; |
|
270 | + $name = (string) $name; |
|
271 | 271 | $this->log[] = "parameter $name not found"; |
272 | 272 | if (!$noError) { |
273 | 273 | $this->parametersErrorFromHydrate[$name] = $value; |
@@ -19,7 +19,7 @@ |
||
19 | 19 | const MODEL_NAME = 'lien web'; |
20 | 20 | |
21 | 21 | const REQUIRED_PARAMETERS |
22 | - = [ |
|
22 | + = [ |
|
23 | 23 | // 'langue' => '', // suggéré |
24 | 24 | 'titre' => '', // required |
25 | 25 | 'url' => '', // required |
@@ -107,7 +107,7 @@ |
||
107 | 107 | ['[[wikilien]', 'wikilien'], |
108 | 108 | ['[[wiki|wikilien]]', 'wikilien'], |
109 | 109 | ['{{en}}', '{{en}}'], |
110 | - ['{{Lien|Jeffrey Robinson}}','Jeffrey Robinson'], |
|
110 | + ['{{Lien|Jeffrey Robinson}}', 'Jeffrey Robinson'], |
|
111 | 111 | ]; |
112 | 112 | } |
113 | 113 | } |
@@ -39,7 +39,7 @@ |
||
39 | 39 | { |
40 | 40 | return array_filter( |
41 | 41 | $myArray, |
42 | - function ($value) { |
|
42 | + function($value) { |
|
43 | 43 | return (null !== $value && '' !== $value); |
44 | 44 | } |
45 | 45 | ); |
@@ -106,8 +106,8 @@ discard block |
||
106 | 106 | } |
107 | 107 | |
108 | 108 | // translation : "London"->"Londres" seulement si langue=fr |
109 | - if($this->hasParamValue('langue') |
|
110 | - && $this->getParam('langue') === self::WIKI_LANGUAGE ) { |
|
109 | + if ($this->hasParamValue('langue') |
|
110 | + && $this->getParam('langue') === self::WIKI_LANGUAGE) { |
|
111 | 111 | $manager = new FileManager(); |
112 | 112 | $row = $manager->findCSVline(__DIR__.'/resources/traduction_ville.csv', $location); |
113 | 113 | if (!empty($row) && !empty($row[1])) { |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | if (count($res) >= 2 && empty($auteur2)) { |
193 | 193 | // delete author-params |
194 | 194 | array_map( |
195 | - function ($param) { |
|
195 | + function($param) { |
|
196 | 196 | $this->unsetParam($param); |
197 | 197 | }, |
198 | 198 | ['auteur', 'auteurs', 'prénom1', 'nom1'] |
@@ -732,7 +732,7 @@ discard block |
||
732 | 732 | // todo bug {{citation bloc}} si "=" ou "|" dans texte de citation |
733 | 733 | // Legacy : use {{début citation}} ... {{fin citation}} |
734 | 734 | if (preg_match('#[=|]#', $extrait) > 0) { |
735 | - $this->ouvrage->externalTemplates[] = (object)[ |
|
735 | + $this->ouvrage->externalTemplates[] = (object) [ |
|
736 | 736 | 'template' => 'début citation', |
737 | 737 | '1' => '', |
738 | 738 | 'raw' => '{{Début citation}}'.$extrait.'{{Fin citation}}', |
@@ -741,7 +741,7 @@ discard block |
||
741 | 741 | $this->notCosmetic = true; |
742 | 742 | } else { |
743 | 743 | // StdClass |
744 | - $this->ouvrage->externalTemplates[] = (object)[ |
|
744 | + $this->ouvrage->externalTemplates[] = (object) [ |
|
745 | 745 | 'template' => 'citation bloc', |
746 | 746 | '1' => $extrait, |
747 | 747 | 'raw' => '{{Citation bloc|'.$extrait.'}}', |
@@ -757,7 +757,7 @@ discard block |
||
757 | 757 | // "commentaire=bla" => {{Commentaire biblio|1=bla}} |
758 | 758 | if ($this->hasParamValue('commentaire')) { |
759 | 759 | $commentaire = $this->getParam('commentaire'); |
760 | - $this->ouvrage->externalTemplates[] = (object)[ |
|
760 | + $this->ouvrage->externalTemplates[] = (object) [ |
|
761 | 761 | 'template' => 'commentaire biblio', |
762 | 762 | '1' => $commentaire, |
763 | 763 | 'raw' => '{{Commentaire biblio|'.$commentaire.'}}', |