Passed
Push — master ( e121f1...792cb7 )
by Dispositif
02:56
created
src/Application/RecentChangeWorker.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,15 +41,15 @@
 block discarded – undo
41 41
 
42 42
     public function trackUser(string $user): void
43 43
     {
44
-        echo "**** TRACK " . $user . "*****\n";
44
+        echo "**** TRACK ".$user."*****\n";
45 45
 
46 46
         $titles = $this->getLastEditsbyUser($user);
47 47
 
48 48
         // filter titles already in edited.txt
49 49
         $edited = file(__DIR__.'/resources/article_externRef_edited.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
50 50
         $filtered = array_diff($titles, $edited);
51
-        $list = new PageList( $filtered ); // TODO PageList factory in App ?
52
-        echo ">" . $list->count() . " dans liste\n";
51
+        $list = new PageList($filtered); // TODO PageList factory in App ?
52
+        echo ">".$list->count()." dans liste\n";
53 53
 
54 54
         $this->consumeList($list);
55 55
     }
Please login to merge, or discard this patch.
src/Application/ExternRefWorker.php 1 patch
Spacing   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     public const SLEEP_AFTER_EDITION = 15; // sec
28 28
     public const MINUTES_DELAY_AFTER_LAST_HUMAN_EDIT = 10; // minutes
29 29
     public const CHECK_EDIT_CONFLICT = true;
30
-    public const ARTICLE_ANALYZED_FILENAME = __DIR__ . '/resources/article_externRef_edited.txt';
30
+    public const ARTICLE_ANALYZED_FILENAME = __DIR__.'/resources/article_externRef_edited.txt';
31 31
     public const SKIP_ADQ = false;
32 32
     public const SKIP_LASTEDIT_BY_BOT = false;
33 33
     public const CITATION_NUMBER_ON_FIRE = 15;
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             $result = $this->transformer->process($refContent, $this->summary);
61 61
         } catch (Throwable $e) {
62 62
             echo "** Problème détecté 234242\n";
63
-            $this->log->critical($e->getMessage() . " " . $e->getFile() . ":" . $e->getLine());
63
+            $this->log->critical($e->getMessage()." ".$e->getFile().":".$e->getLine());
64 64
             // TODO : parse $e->message -> variable process, taskName, botflag...
65 65
 
66 66
             return $refContent;
@@ -120,10 +120,10 @@  discard block
 block discarded – undo
120 120
         $prefixSummary = ($this->summary->isBotFlag()) ? 'bot ' : '';
121 121
         $suffix = '';
122 122
         if (isset($this->summary->memo['count article'])) {
123
-            $suffix .= ' ' . $this->summary->memo['count article'] . 'x {article}';
123
+            $suffix .= ' '.$this->summary->memo['count article'].'x {article}';
124 124
         }
125 125
         if (isset($this->summary->memo['count lien web'])) {
126
-            $suffix .= ' ' . $this->summary->memo['count lien web'] . 'x {lien web}';
126
+            $suffix .= ' '.$this->summary->memo['count lien web'].'x {lien web}';
127 127
         }
128 128
         if (isset($this->summary->memo['presse'])) {
129 129
             $suffix .= ' 
Please login to merge, or discard this patch.
src/Application/CLI/testExternLink.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     // Attention : pas de post-processing (sanitize title, etc.)
38 38
     $result = $trans->process($url, $summary);
39 39
 } catch (Exception $e) {
40
-    $result = "EXCEPTION ". $e->getMessage().$e->getFile().$e->getLine();
40
+    $result = "EXCEPTION ".$e->getMessage().$e->getFile().$e->getLine();
41 41
 }
42 42
 
43 43
 echo $result."\n";
Please login to merge, or discard this patch.
src/Application/CLI/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/CLI/externRefProcess.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
 //echo count($titles)." titles\n";
79 79
 $edited = file(__DIR__.'/../resources/article_externRef_edited.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
80 80
 $filtered = array_diff($titles, $edited);
81
-$list = new PageList( $filtered );
81
+$list = new PageList($filtered);
82 82
 echo ">".$list->count()." dans liste\n";
83 83
 
84 84
 new ExternRefWorker($botConfig, $wiki, $list, null, new InternetDomainParser());
Please login to merge, or discard this patch.
src/Application/OuvrageCompleteWorker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -333,7 +333,7 @@
 block discarded – undo
333 333
             'modifs' => mb_substr(implode(',', $this->getSummaryLog()), 0, 250),
334 334
             'notcosmetic' => ($this->notCosmetic) ? 1 : 0,
335 335
             'major' => ($this->major) ? 1 : 0,
336
-            'isbn' => substr($isbn,0,19),
336
+            'isbn' => substr($isbn, 0, 19),
337 337
             'version' => WikiBotConfig::VERSION ?? null,
338 338
         ];
339 339
         $this->logger->info('finalData', $finalData);
Please login to merge, or discard this patch.
src/Domain/ExternLink/CheckURL.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $this->url = $url;
50 50
         $this->registrableDomain = null;
51 51
         if (!ExternHttpClient::isHttpURL($url)) {
52
-            $this->log->debug('Skip : not a valid URL : ' . $url);
52
+            $this->log->debug('Skip : not a valid URL : '.$url);
53 53
             return false;
54 54
         }
55 55
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             return false;
58 58
         }
59 59
         if (!ExternHttpClient::isHttpURL($url)) {
60
-            throw new Exception('string is not an URL ' . $url);
60
+            throw new Exception('string is not an URL '.$url);
61 61
         }
62 62
 
63 63
         $this->findRegistrableDomain();
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         try {
80 80
             $this->registrableDomain = $this->internetDomainParser->getRegistrableDomainFromURL($this->url);
81 81
         } catch (Exception $e) {
82
-            $this->log->warning('Skip : not a valid URL : ' . $this->url);
82
+            $this->log->warning('Skip : not a valid URL : '.$this->url);
83 83
             return null;
84 84
         }
85 85
         return $this->registrableDomain;
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      */
93 93
     protected function hasForbiddenFilenameExtension(): bool
94 94
     {
95
-        return (bool)preg_match(
95
+        return (bool) preg_match(
96 96
             '#\.(pdf|jpg|jpeg|gif|png|xls|xlsx|xlr|xml|xlt|txt|csv|js|docx|exe|gz|zip|ini|movie|mp3|mp4|ogg|raw|rss|tar|tgz|wma)$#i',
97 97
             $this->url
98 98
         );
Please login to merge, or discard this patch.