Test Failed
Push — master ( aa40d3...766a39 )
by Dispositif
07:56
created
src/Domain/Models/Wiki/BiblioTemplateTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Domain/Models/Wiki/AbstractWikiTemplate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Domain/TypoTokenizer.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         // PUNCTUATION conversion
54 54
         $punctuationColl = array_filter(
55 55
             TextUtil::ALL_PUNCTUATION,
56
-            function ($value) {
56
+            function($value) {
57 57
                 // skip punctuation chars from mixed names (example : "Pierre-Marie L'Anglois")
58 58
                 return !in_array($value, ["'", '-', '-']);
59 59
             }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             }
73 73
             if (preg_match('#^(PATTERNINITIAL|PATTERNURL|PATTERNAND|PATTERNCOMMA|PATTERNBIBABREV|PATTERNPUNCTUATION)$#', $tok, $matches) > 0) {
74 74
 
75
-                $shortpattern = str_replace('PATTERN','', $tok);
75
+                $shortpattern = str_replace('PATTERN', '', $tok);
76 76
                 $res['pattern'] .= ' '.$shortpattern; // PATTERNAND -> AND
77 77
                 if (in_array($matches[1], ['PATTERNCOMMA', 'PATTERNPUNCTUATION']) || empty($matches[1])) {
78 78
                     $res['value'][] = '*';
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         return preg_replace_callback_array(
130 130
             [
131 131
                 // URL
132
-                '#\bhttps?://[^ \]]+#i' => function ($match): string {
132
+                '#\bhttps?://[^ \]]+#i' => function($match): string {
133 133
                     // '#https?\:\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+\#]*[\w\-\@?^=%&/~\+#])?#'
134 134
                     $this->tokenValue['URL'][] = $match[0];
135 135
 
@@ -137,26 +137,26 @@  discard block
 block discarded – undo
137 137
                 },
138 138
                 // BIBABREV : "dir.", "trad.", "(dir.)", "[dir.]", etc.
139 139
                 // TODO: regex flaw : "(" not evaluated in BIBABREV. Example : "(dir.)"
140
-                '#\b[(\[]?(collectif|coll\.|dir\.|trad\.|coord\.|ill\.)[)\]]?#i' => function ($match): string {
140
+                '#\b[(\[]?(collectif|coll\.|dir\.|trad\.|coord\.|ill\.)[)\]]?#i' => function($match): string {
141 141
                     $this->tokenValue['BIBABREV'][] = $match[0]; // [1] = dir
142 142
 
143 143
                     return ' PATTERNBIBABREV ';
144 144
                 },
145 145
                 // AND
146
-                '# (et|and|&|with|avec|e) #i' => function ($match): string {
146
+                '# (et|and|&|with|avec|e) #i' => function($match): string {
147 147
                     $this->tokenValue['AND'][] = $match[0];
148 148
 
149 149
                     return ' PATTERNAND ';
150 150
                 },
151 151
                 // COMMA
152
-                '#,#' => function (): string {
152
+                '#,#' => function(): string {
153 153
                     return ' PATTERNCOMMA ';
154 154
                 },
155 155
                 // INITIAL : 2) convert letter ("A.") or junior ("Jr.") or senior ("Sr.")
156 156
                 // extract initial before "." converted in PUNCTUATION
157 157
                 // Note : \b word boundary match between "L" and "'Amour" in "L'Amour"  (for [A-Z]\b)
158 158
                 // \b([A-Z]\. |[A-Z] |JR|Jr\.|Jr\b|Sr\.|Sr\b)+ for grouping "A. B." in same INITIAL ?
159
-                "#\b([A-Z]\.|[A-Z] |JR|Jr\.|Jr\b|Sr\.|Sr\b)#" => function ($match): string {
159
+                "#\b([A-Z]\.|[A-Z] |JR|Jr\.|Jr\b|Sr\.|Sr\b)#" => function($match): string {
160 160
                     $this->tokenValue['INITIAL'][] = $match[0];
161 161
 
162 162
                     return ' PATTERNINITIAL ';
Please login to merge, or discard this patch.
src/Domain/OuvrageOptimize.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         if (count((array) $res) >= 2 && empty($auteur2)) {
183 183
             // delete author-params
184 184
             array_map(
185
-                function ($param) {
185
+                function($param) {
186 186
                     $this->unsetParam($param);
187 187
                 },
188 188
                 ['auteur', 'auteurs', 'prénom1', 'nom1']
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
             // todo bug {{citation bloc}} si "=" ou "|" dans texte de citation
531 531
             // Legacy : use {{début citation}} ... {{fin citation}}
532 532
             if (preg_match('#[=|]#', $extrait) > 0) {
533
-                $this->optiTemplate->externalTemplates[] = (object)[
533
+                $this->optiTemplate->externalTemplates[] = (object) [
534 534
                     'template' => 'début citation',
535 535
                     '1' => '',
536 536
                     'raw' => '{{Début citation}}'.$extrait.'{{Fin citation}}',
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
                 $this->notCosmetic = true;
540 540
             } else {
541 541
                 // StdClass
542
-                $this->optiTemplate->externalTemplates[] = (object)[
542
+                $this->optiTemplate->externalTemplates[] = (object) [
543 543
                     'template' => 'citation bloc',
544 544
                     '1' => $extrait,
545 545
                     'raw' => '{{Citation bloc|'.$extrait.'}}',
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
         // "commentaire=bla" => {{Commentaire biblio|1=bla}}
556 556
         if ($this->hasParamValue('commentaire')) {
557 557
             $commentaire = $this->getParam('commentaire');
558
-            $this->optiTemplate->externalTemplates[] = (object)[
558
+            $this->optiTemplate->externalTemplates[] = (object) [
559 559
                 'template' => 'commentaire biblio',
560 560
                 '1' => $commentaire,
561 561
                 'raw' => '{{Commentaire biblio|'.$commentaire.'}}',
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
             $this->log->error('Catch EDITOR_TITLES_FILENAME import '.$e->getMessage());
699 699
         }
700 700
         if (isset($data[$publisherName])) {
701
-            return (string)urldecode($data[$publisherName]);
701
+            return (string) urldecode($data[$publisherName]);
702 702
         }
703 703
 
704 704
         return null;
Please login to merge, or discard this patch.