@@ -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( |
@@ -22,7 +22,7 @@ |
||
22 | 22 | { |
23 | 23 | public function process($data): array |
24 | 24 | { |
25 | - if(!isset($data['JSON-LD'])) { |
|
25 | + if (!isset($data['JSON-LD'])) { |
|
26 | 26 | return []; |
27 | 27 | } |
28 | 28 | $data = $data['JSON-LD']; |
@@ -52,9 +52,9 @@ discard block |
||
52 | 52 | /** |
53 | 53 | * @var AbstractWikiTemplate |
54 | 54 | */ |
55 | - try{ |
|
55 | + try { |
|
56 | 56 | $tplObject = WikiTemplateFactory::create($tplName); |
57 | - }catch (\Throwable $e){ |
|
57 | + } catch (\Throwable $e) { |
|
58 | 58 | unset($e); |
59 | 59 | continue; |
60 | 60 | } |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | ) { |
190 | 190 | array_walk( |
191 | 191 | $matches, |
192 | - function (&$value) { |
|
192 | + function(&$value) { |
|
193 | 193 | $value = str_replace(['CURLYBRACKETO', 'CURLYBRACKETC'], ['{', '}'], $value); |
194 | 194 | } |
195 | 195 | ); |
@@ -54,7 +54,7 @@ |
||
54 | 54 | */ |
55 | 55 | try{ |
56 | 56 | $tplObject = WikiTemplateFactory::create($tplName); |
57 | - }catch (\Throwable $e){ |
|
57 | + } catch (\Throwable $e){ |
|
58 | 58 | unset($e); |
59 | 59 | continue; |
60 | 60 | } |
@@ -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(); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | if (!$articleOrLienBrise instanceof ArticleOrLienBriseInterface) { |
50 | 50 | continue; |
51 | 51 | } |
52 | - if($articleOrLienBrise instanceof LienBriseTemplate){ |
|
52 | + if ($articleOrLienBrise instanceof LienBriseTemplate) { |
|
53 | 53 | $this->warning = true; |
54 | 54 | } |
55 | 55 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | public function hasWarning():bool |
64 | 64 | { |
65 | - return (bool)$this->warning; |
|
65 | + return (bool) $this->warning; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | private function replaceRefInText(array $ref, string $replace, string $text) |
@@ -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 |