Passed
Push — master ( e42360...d2e488 )
by Dispositif
06:33
created
src/Domain/Models/Wiki/AbstractStrictWikiTemplate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@
 block discarded – undo
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 ?
Please login to merge, or discard this patch.
src/Domain/Models/Wiki/AbstractWikiTemplate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -270,7 +270,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Infrastructure/WstatImport.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Domain/Publisher/ExternConverterTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Infrastructure/WikidataAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
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']));
Please login to merge, or discard this patch.
src/Domain/Utils/TemplateParser.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             }
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
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         if (count($res) >= 2 && empty($auteur2)) {
182 182
             // delete author-params
183 183
             array_map(
184
-                function ($param) {
184
+                function($param) {
185 185
                     $this->unsetParam($param);
186 186
                 },
187 187
                 ['auteur', 'auteurs', 'prénom1', 'nom1']
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
             // todo bug {{citation bloc}} si "=" ou "|" dans texte de citation
532 532
             // Legacy : use {{début citation}} ... {{fin citation}}
533 533
             if (preg_match('#[=|]#', $extrait) > 0) {
534
-                $this->optiTemplate->externalTemplates[] = (object)[
534
+                $this->optiTemplate->externalTemplates[] = (object) [
535 535
                     'template' => 'début citation',
536 536
                     '1' => '',
537 537
                     'raw' => '{{Début citation}}'.$extrait.'{{Fin citation}}',
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
                 $this->notCosmetic = true;
541 541
             } else {
542 542
                 // StdClass
543
-                $this->optiTemplate->externalTemplates[] = (object)[
543
+                $this->optiTemplate->externalTemplates[] = (object) [
544 544
                     'template' => 'citation bloc',
545 545
                     '1' => $extrait,
546 546
                     'raw' => '{{Citation bloc|'.$extrait.'}}',
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
         // "commentaire=bla" => {{Commentaire biblio|1=bla}}
557 557
         if ($this->hasParamValue('commentaire')) {
558 558
             $commentaire = $this->getParam('commentaire');
559
-            $this->optiTemplate->externalTemplates[] = (object)[
559
+            $this->optiTemplate->externalTemplates[] = (object) [
560 560
                 'template' => 'commentaire biblio',
561 561
                 '1' => $commentaire,
562 562
                 'raw' => '{{Commentaire biblio|'.$commentaire.'}}',
@@ -700,7 +700,7 @@  discard block
 block discarded – undo
700 700
             $this->log->error('Catch EDITOR_TITLES_FILENAME import '.$e->getMessage());
701 701
         }
702 702
         if (isset($data[$publisherName])) {
703
-            return (string)urldecode($data[$publisherName]);
703
+            return (string) urldecode($data[$publisherName]);
704 704
         }
705 705
 
706 706
         return null;
Please login to merge, or discard this patch.
src/Application/Examples/globalProcess.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 
10 10
 $filename = __DIR__.'/resources/global_process.json';
11 11
 
12
-$saveData = function ($data) use ($filename) {
12
+$saveData = function($data) use ($filename) {
13 13
     $res = file_put_contents($filename, json_encode($data));
14 14
     if ($res === false) {
15 15
         throw new \Exception("impossible d'enregistrer $filename");
Please login to merge, or discard this patch.
src/Application/AbstractBotTaskWorker.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         }
71 71
         $this->setUpInConstructor();
72 72
 
73
-        $this->run();//todo delete that and use (Worker)->run($duration) or process management
73
+        $this->run(); //todo delete that and use (Worker)->run($duration) or process management
74 74
     }
75 75
 
76 76
     protected function setUpInConstructor(): void
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
         }
220 220
 
221 221
         dump($result);
222
-        echo "Sleep ".(string)static::SLEEP_AFTER_EDITION."\n";
222
+        echo "Sleep ".(string) static::SLEEP_AFTER_EDITION."\n";
223 223
         sleep(static::SLEEP_AFTER_EDITION);
224 224
     }
225 225
 }
Please login to merge, or discard this patch.