Passed
Push — master ( f36d22...dff8a4 )
by Dispositif
02:58
created
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/Application/Examples/ouvrageCompleteProcess.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,9 +51,9 @@
 block discarded – undo
51 51
             sleep(60 * 10);
52 52
             exit;
53 53
         }
54
-        if(preg_match('#Quota exceeded#', $e->getMessage())) {
54
+        if (preg_match('#Quota exceeded#', $e->getMessage())) {
55 55
             echo "ouvrageCompleteProcess : Quota exceeded. Sleep 4h and EXIT.";
56
-            sleep(60*60*4);
56
+            sleep(60 * 60 * 4);
57 57
             exit;
58 58
         }
59 59
 
Please login to merge, or discard this patch.
src/Application/Http/HttpClientInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,5 +13,5 @@
 block discarded – undo
13 13
 
14 14
 interface HttpClientInterface
15 15
 {
16
-    public function getHTML(string $url, ?bool $normalized=false): ?string;
16
+    public function getHTML(string $url, ?bool $normalized = false): ?string;
17 17
 }
Please login to merge, or discard this patch.
src/Infrastructure/PageList.php 1 patch
Spacing   +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
 
61
-        return new PageList((array)$titles);
61
+        return new PageList((array) $titles);
62 62
     }
63 63
 
64 64
     /**
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
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $this->pastAnalyzed = ($analyzed !== false) ? $analyzed : [];
91 91
 
92 92
         // @throw exception on "Invalid CSRF token"
93
-        $this->run();//todo delete that and use (Worker)->run($duration) or process management
93
+        $this->run(); //todo delete that and use (Worker)->run($duration) or process management
94 94
     }
95 95
 
96 96
     protected function setUpInConstructor(): void
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
         }
267 267
 
268 268
         dump($result);
269
-        echo "Sleep ".(string)static::SLEEP_AFTER_EDITION."\n";
269
+        echo "Sleep ".(string) static::SLEEP_AFTER_EDITION."\n";
270 270
         sleep(static::SLEEP_AFTER_EDITION);
271 271
     }
272 272
 
Please login to merge, or discard this patch.
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/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/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::english2french((new DateTime())->format('j F Y \à H\:i').' (CEST)');
80 80
 
Please login to merge, or discard this patch.