Completed
Push — master ( 44374d...601753 )
by Dispositif
05:03
created
src/Application/ErrorReport.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
             ) > 0
30 30
         ) {
31 31
             // FIXED zizibot : des '<nowiki>' supplémentaires ajoutés à quelques rapports
32
-            return str_replace('<nowiki>','', $matches[1]);
32
+            return str_replace('<nowiki>', '', $matches[1]);
33 33
         }
34 34
 
35 35
         return null;
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      *
56 56
      * @return string
57 57
      */
58
-    public function deleteAllReports(string $text, ?string $botName='ZiziBot'): string
58
+    public function deleteAllReports(string $text, ?string $botName = 'ZiziBot'): string
59 59
     {
60 60
         $pattern = sprintf(
61 61
             '#== Ouvrage avec erreur de paramètre ==(.*)Le robot \[\[Utilisateur:%s\|%s\]\] \(\[\[Discussion utilisateur:%s\|discuter\]\]\) [0-9a-zéà: ]+ \(CET\)[\n]*#s',
Please login to merge, or discard this patch.
src/Application/Examples/EditProcess.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -305,7 +305,7 @@
 block discarded – undo
305 305
             '%s [%s/%s] %s %s : %s',
306 306
             $prefix,
307 307
             str_replace('v', '', $this->bot::getGitVersion()),
308
-            str_replace(['v0.','v1.'], '', $this->citationVersion),
308
+            str_replace(['v0.', 'v1.'], '', $this->citationVersion),
309 309
             self::TASK_NAME,
310 310
             $this->nbRows,
311 311
             $citeSummary
Please login to merge, or discard this patch.
src/Domain/Utils/ArrayProcessTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     {
23 23
         return array_filter(
24 24
             $myArray,
25
-            function ($value) {
25
+            function($value) {
26 26
                 return !is_null($value) && '' !== $value;
27 27
             }
28 28
         );
Please login to merge, or discard this patch.
src/Application/Examples/plumeBot.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
                 $replacement = str_replace('{{extrait', '{{Citation bloc', $template);
44 44
                 echo ">".$replacement."\n";
45 45
                 $newText = str_replace($template, $replacement, $newText);
46
-            }else{
46
+            } else {
47 47
                 // {Début citation} et {{Fin citation}}
48 48
                 $replacement = str_replace('{{extrait|', '{{Début citation}}', $template.'{{Fin citation}}');
49 49
                 echo ">".$replacement."\n";
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     }
59 59
 
60 60
     $ask = readline("*** ÉDITION ? [y/n]");
61
-    if( 'y' !== $ask){
61
+    if ('y' !== $ask) {
62 62
         continue;
63 63
     }
64 64
 
Please login to merge, or discard this patch.
src/Domain/ImportOuvrageFromApi.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,14 +60,14 @@
 block discarded – undo
60 60
          */
61 61
         $data = $this->mapping($volume);
62 62
 
63
-        if(isset($data['infos'])) {
63
+        if (isset($data['infos'])) {
64 64
             $infos = $data['infos'];
65 65
             unset($data['infos']);
66 66
         }
67 67
 
68 68
         try {
69 69
             $this->ouvrage->hydrate($data);
70
-            if(isset($infos)) {
70
+            if (isset($infos)) {
71 71
                 $this->ouvrage->setInfos($infos);
72 72
             }
73 73
         } catch (Throwable $e) {
Please login to merge, or discard this patch.
src/Application/Examples/CompleteProcess.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -136,8 +136,7 @@  discard block
 block discarded – undo
136 136
 
137 137
     private function onlineIsbnSearch(string $isbn, ?string $isbn10 = null)
138 138
     {
139
-        online:
140
-        echo "sleep 10...\n";
139
+        online : echo "sleep 10...\n";
141 140
         sleep(10);
142 141
 
143 142
         try {
@@ -154,7 +153,7 @@  discard block
 block discarded – undo
154 153
                 $this->completeOuvrage($bnfOuvrage);
155 154
 
156 155
                 // Wikidata requests from $infos (ISBN/ISNI)
157
-                if(!empty($bnfOuvrage->getInfos())) {
156
+                if (!empty($bnfOuvrage->getInfos())) {
158 157
                     dump('WIKIDATA...');
159 158
                     $wdComplete = new Wikidata2Ouvrage(clone $bnfOuvrage);
160 159
                     $this->completeOuvrage($wdComplete->getOuvrage());
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
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
             $res = $this->searchByISNI($infos['ISNIAuteur1']);
41 41
         }
42 42
         if (isset($infos['isbn'])) {
43
-            if(!empty($res)) {
43
+            if (!empty($res)) {
44 44
                 sleep(2);
45 45
             }
46 46
             $res = array_merge($res, $this->findArticleByISBN13($infos['isbn']));
Please login to merge, or discard this patch.
src/Application/Examples/avancement.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,10 +40,10 @@
 block discarded – undo
40 40
 $db = new Mysql($pdo);
41 41
 
42 42
 $monitor = $db->fetchRow('select count(id) from temprawopti where optidate is not null');
43
-$number = (int)$monitor['count(id)'];
43
+$number = (int) $monitor['count(id)'];
44 44
 
45 45
 $monitor = $db->fetchRow('select count(distinct page) as pages from temprawopti where optidate is not null and isbn<>""');
46
-$pageNb = (int)$monitor['pages'];
46
+$pageNb = (int) $monitor['pages'];
47 47
 
48 48
 $newText = <<<EOF
49 49
 <div style="background:#EBF6E9;border:2px solid grey;padding:10px;border-radius:10px;">
Please login to merge, or discard this patch.