Passed
Branch dev3 (024e59)
by Dispositif
12:55
created
src/Domain/Transformers/Handlers/MixLienAuteur.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,10 +62,10 @@
 block discarded – undo
62 62
      */
63 63
     private function concatParamsAuteur1(OuvrageTemplate $ouvrage, ?int $num = 1): ?string
64 64
     {
65
-        $auteur = $ouvrage->getParam('auteur' . $num) ?? '';
66
-        $prenom = $ouvrage->getParam('prénom' . $num) ?? '';
67
-        $nom = $ouvrage->getParam('nom' . $num) ?? '';
65
+        $auteur = $ouvrage->getParam('auteur'.$num) ?? '';
66
+        $prenom = $ouvrage->getParam('prénom'.$num) ?? '';
67
+        $nom = $ouvrage->getParam('nom'.$num) ?? '';
68 68
 
69
-        return trim($auteur . ' ' . $prenom . ' ' . $nom);
69
+        return trim($auteur.' '.$prenom.' '.$nom);
70 70
     }
71 71
 }
72 72
\ No newline at end of file
Please login to merge, or discard this patch.
src/Domain/Predict/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/Application/ExternLink/ExternRefWorker.php 1 patch
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     public const SLEEP_AFTER_EDITION = 15; // sec
29 29
     public const MINUTES_DELAY_AFTER_LAST_HUMAN_EDIT = 10; // minutes
30 30
     public const CHECK_EDIT_CONFLICT = true;
31
-    public const ARTICLE_ANALYZED_FILENAME = __DIR__ . '/../resources/article_externRef_edited.txt';
31
+    public const ARTICLE_ANALYZED_FILENAME = __DIR__.'/../resources/article_externRef_edited.txt';
32 32
     public const SKIP_ADQ = false;
33 33
     public const SKIP_LASTEDIT_BY_BOT = false;
34 34
     public const CITATION_NUMBER_ON_FIRE = 15;
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             $result = $this->transformer->process($refContent, $this->summary);
62 62
         } catch (Throwable $e) {
63 63
             echo "** Problème détecté 234242\n";
64
-            $this->log->critical($e->getMessage() . " " . $e->getFile() . ":" . $e->getLine());
64
+            $this->log->critical($e->getMessage()." ".$e->getFile().":".$e->getLine());
65 65
             // TODO : parse $e->message -> variable process, taskName, botflag...
66 66
 
67 67
             return $refContent;
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
         $prefixSummary = ($this->summary->isBotFlag()) ? 'bot ' : '';
122 122
         $suffix = '';
123 123
         if (isset($this->summary->memo['count article'])) {
124
-            $suffix .= ' ' . $this->summary->memo['count article'] . 'x {article}';
124
+            $suffix .= ' '.$this->summary->memo['count article'].'x {article}';
125 125
         }
126 126
         if (isset($this->summary->memo['count lien web'])) {
127
-            $suffix .= ' ' . $this->summary->memo['count lien web'] . 'x {lien web}';
127
+            $suffix .= ' '.$this->summary->memo['count lien web'].'x {lien web}';
128 128
         }
129 129
         if (isset($this->summary->memo['presse'])) {
130 130
             $suffix .= ' 
Please login to merge, or discard this patch.
src/Domain/ExternLink/SummaryExternTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
             $this->summary->memo['sites'][] = $this->externalPage->getPrettyDomainName(); // ???
34 34
         }
35 35
         if (isset($mapData['accès url'])) {
36
-            $this->log->debug('accès 
Please login to merge, or discard this patch.