Passed
Push — master ( eb1f44...b85f0f )
by Dispositif
06:16
created
src/Application/Examples/wikiScanProcess.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
 
59 59
 
60 60
 // utilise une liste d'import wstat.fr
61
- echo "Liste d'après wstat.fr\n";
61
+    echo "Liste d'après wstat.fr\n";
62 62
 $list = PageList::FromFile(__DIR__.'/../resources/importISBN_nov.txt');
63 63
 new ScanWiki2DB($wiki, new DbAdapter(), new WikiBotConfig(), $list, 0);
64 64
 
Please login to merge, or discard this patch.
src/Application/NotificationWorker.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
             $this->processSpecialActions($notif);
112 112
         }
113 113
 
114
-        if(empty($wikilog)) {
114
+        if (empty($wikilog)) {
115 115
             echo "Nothing.";
116 116
             return;
117 117
         }
Please login to merge, or discard this patch.
src/Application/VoteAdmin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             throw new ConfigException('Pas de phrases disponibles');
103 103
         }
104 104
 
105
-        return (string)trim($sentences[array_rand($sentences)]);
105
+        return (string) trim($sentences[array_rand($sentences)]);
106 106
     }
107 107
 
108 108
     private function generateVoteInsertionText(): ?string
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
         $html = $this->getAdminScoreHtml();
258 258
 
259 259
         if (!empty($html) && preg_match('#<th>Total</th>[^<]*<th>([0-9]+)</th>#', $html, $matches)) {
260
-            return (int)$matches[1];
260
+            return (int) $matches[1];
261 261
         }
262 262
 
263 263
         return null;
Please login to merge, or discard this patch.
src/Application/Http/ExternHttpClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
             return null;
72 72
         }
73 73
 
74
-        $html = (string)$response->getBody()->getContents() ?? '';
74
+        $html = (string) $response->getBody()->getContents() ?? '';
75 75
 
76 76
         return ($normalized) ? $this->normalizeHtml($html, $url) : $html;
77 77
     }
Please login to merge, or discard this patch.
src/Application/WikiBotConfig.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -228,9 +228,9 @@  discard block
 block discarded – undo
228 228
      */
229 229
     public function minutesSinceLastEdit(string $title): int
230 230
     {
231
-        $time = $this->getTimestamp($title);  // 2011-09-02T16:31:13Z
231
+        $time = $this->getTimestamp($title); // 2011-09-02T16:31:13Z
232 232
 
233
-        return (int)round((time() - strtotime($time)) / 60);
233
+        return (int) round((time() - strtotime($time)) / 60);
234 234
     }
235 235
 
236 236
     /**
@@ -246,8 +246,7 @@  discard block
 block discarded – undo
246 246
     {
247 247
         $text = WikiTextUtil::removeHTMLcomments($text);
248 248
         $botName = ($botName) ? $botName : getenv('BOT_NAME');
249
-        $denyReg = (!empty($botName)) ? '|\{\{bots ?\| ?(optout|deny)\=[^\}]*'.preg_quote($botName, '#').'[^\}]*\}\}' :
250
-            '';
249
+        $denyReg = (!empty($botName)) ? '|\{\{bots ?\| ?(optout|deny)\=[^\}]*'.preg_quote($botName, '#').'[^\}]*\}\}' : '';
251 250
 
252 251
         if (preg_match('#({{nobots}}|{{bots ?\| ?(optout|deny) ?= ?all ?}}'.$denyReg.')#i', $text) > 0) {
253 252
             return true;
Please login to merge, or discard this patch.
src/Application/Examples/botstats.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -37,25 +37,25 @@  discard block
 block discarded – undo
37 37
 $data = [];
38 38
 
39 39
 $monitor = $db->fetchRow('select count(id) from page_ouvrages where optidate is null and edited is null and skip=0');
40
-$data['not analyzed citation'] = (int)$monitor['count(id)'];
40
+$data['not analyzed citation'] = (int) $monitor['count(id)'];
41 41
 
42 42
 $monitor = $db->fetchRow('select count(id) from page_ouvrages where optidate is not null');
43
-$data['analyzed citation'] = (int)$monitor['count(id)'];
43
+$data['analyzed citation'] = (int) $monitor['count(id)'];
44 44
 
45 45
 $monitor = $db->fetchRow('select count(distinct page) as n from page_ouvrages where skip=1 and edited is null'); //  ?
46
-$data['skip pages'] = (int)$monitor['n'];
46
+$data['skip pages'] = (int) $monitor['n'];
47 47
 
48 48
 $monitor = $db->fetchRow('select count(distinct page) as n from page_ouvrages where edited is true');
49
-$data['edited pages'] = (int)$monitor['n'];
49
+$data['edited pages'] = (int) $monitor['n'];
50 50
 
51 51
 $monitor = $db->fetchRow('select count(id) from page_ouvrages where optidate > SUBDATE(NOW(),1)');
52
-$data['analyzed citation 24H'] = (int)$monitor['count(id)'];
52
+$data['analyzed citation 24H'] = (int) $monitor['count(id)'];
53 53
 
54 54
 $monitor = $db->fetchRow('select count(id) as n from page_ouvrages where edited > SUBDATE(NOW(),1)');
55
-$data['edited citations 24H'] = (int)$monitor['n'];
55
+$data['edited citations 24H'] = (int) $monitor['n'];
56 56
 
57 57
 $monitor = $db->fetchRow('select count(distinct page) as n from page_ouvrages where edited > SUBDATE(NOW(),1)');
58
-$data['edited pages 24H'] = (int)$monitor['n'];
58
+$data['edited pages 24H'] = (int) $monitor['n'];
59 59
 
60 60
 $monitor = $db->fetchRow(
61 61
     'SELECT count(distinct A.page) FROM page_ouvrages A
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                     AND A.page = B.page
75 75
                     )'
76 76
 );
77
-$data['waiting pages'] = (int)$monitor['count(distinct A.page)'];
77
+$data['waiting pages'] = (int) $monitor['count(distinct A.page)'];
78 78
 
79 79
 $data['currentdate'] = DateUtil::dateEnglish2french((new DateTime())->format('j F Y \à H\:i').' (CEST)');
80 80
 
Please login to merge, or discard this patch.
src/Application/ExternRefWorker.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -123,8 +123,7 @@
 block discarded – undo
123 123
         }
124 124
         if (isset($this->summary->memo['count lien brisé'])) {
125 125
             $suffix .= ', ⚠️️️lien brisé'; //⚠️
Please login to merge, or discard this patch.
src/Application/Examples/externRefProcess.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
 //echo count($titles)." titles\n";
77 77
 $edited = file(__DIR__.'/../resources/article_externRef_edited.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
78 78
 $filtered = array_diff($titles, $edited);
79
-$list = new PageList( $filtered );
79
+$list = new PageList($filtered);
80 80
 echo ">".$list->count()." dans liste\n";
81 81
 
82 82
 new ExternRefWorker($botConfig, $wiki, $list);
Please login to merge, or discard this patch.
src/Application/ExternRefTransformer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@
 block discarded – undo
188 188
         $this->log->info($serialized."\n");
189 189
 
190 190
         //return Normalizer::normalize($serialized); // sometimes :bool
191
-        if(empty($serialized) || !is_string($serialized))  {
191
+        if (empty($serialized) || !is_string($serialized)) {
192 192
             return $serialized;
193 193
         }
194 194
         return $url;
Please login to merge, or discard this patch.