Passed
Push — master ( 75e8d8...1927ca )
by Dispositif
13:16
created
src/Infrastructure/CirrusSearch.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 {
33 33
     final public const BASE_URL = 'https://fr.wikipedia.org/w/api.php';
34 34
     public const NAMESPACE_MAIN = 0;
35
-    private const SEARCH_CONTINUE_FILENAME = __DIR__ . '/../../resources/cirrusSearch-HASH.txt'; // move to config
35
+    private const SEARCH_CONTINUE_FILENAME = __DIR__.'/../../resources/cirrusSearch-HASH.txt'; // move to config
36 36
     /**
37 37
      * @var array|string[]
38 38
      */
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     {
68 68
         $arrayResp = $this->httpRequest();
69 69
 
70
-        if (($this->options['continue'] ?? false) &&  (!empty($arrayResp['continue']['sroffset']))) {
70
+        if (($this->options['continue'] ?? false) && (!empty($arrayResp['continue']['sroffset']))) {
71 71
             $continueOffset = (int) $arrayResp['continue']['sroffset'];
72 72
             $this->saveOffsetInFile($continueOffset);
73 73
         }
Please login to merge, or discard this patch.
src/Application/AbstractBotTaskWorker.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,12 +32,12 @@  discard block
 block discarded – undo
32 32
     public const SLEEP_AFTER_EDITION = 60;
33 33
     public const MINUTES_DELAY_AFTER_LAST_HUMAN_EDIT = 15;
34 34
     public const CHECK_EDIT_CONFLICT = true;
35
-    public const ARTICLE_ANALYZED_FILENAME = __DIR__ . '/resources/article_edited.txt';
35
+    public const ARTICLE_ANALYZED_FILENAME = __DIR__.'/resources/article_edited.txt';
36 36
     public const SKIP_LASTEDIT_BY_BOT = true;
37 37
     public const SKIP_NOT_IN_MAIN_WIKISPACE = true;
38 38
     public const SKIP_ADQ = true;
39 39
     public const THROTTLE_DELAY_AFTER_EACH_TITLE = 1; //secs
40
-    protected const GIT_COMMIT_HASH_PATH = __DIR__ . '/resources/commithash.txt';
40
+    protected const GIT_COMMIT_HASH_PATH = __DIR__.'/resources/commithash.txt';
41 41
 
42 42
     /**
43 43
      * @var PageListInterface
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         $this->initializePastAnalyzedTitles();
94 94
 
95 95
         // @throw exception on "Invalid CSRF token"
96
-        $this->run();//todo delete that and use (Worker)->run($duration) or process management
96
+        $this->run(); //todo delete that and use (Worker)->run($duration) or process management
97 97
     }
98 98
 
99 99
     /**
@@ -104,13 +104,13 @@  discard block
 block discarded – undo
104 104
     final public function run(): void
105 105
     {
106 106
         $this->log->notice('*** '.date('Y-m-d H:i')
107
-            .' New BotTaskWorker: ' . $this->defaultTaskname, ['stats' => 'bottaskworker.instance']);
107
+            .' New BotTaskWorker: '.$this->defaultTaskname, ['stats' => 'bottaskworker.instance']);
108 108
         $this->log->notice(sprintf(
109 109
             '*** Bot: %s - commit: %s',
110 110
             $this->bot::getBotName(),
111 111
             $this->bot->getCurrentGitCommitHash() ?? '??'
112 112
         ));
113
-        $this->log->notice('*** Stats: ' . $this->log->stats::class);
113
+        $this->log->notice('*** Stats: '.$this->log->stats::class);
114 114
 
115 115
         foreach ($this->getTitles() as $title) {
116 116
             try {
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
         }
220 220
 
221 221
         $this->log->notice($result ? '>> OK' : '>>  NOCHANGE');
222
-        $this->log->debug("Sleep " . static::SLEEP_AFTER_EDITION);
222
+        $this->log->debug("Sleep ".static::SLEEP_AFTER_EDITION);
223 223
         sleep(static::SLEEP_AFTER_EDITION);
224 224
     }
225 225
 
Please login to merge, or discard this patch.
src/Application/CLI/externRefProcess.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,13 +60,13 @@
 block discarded – undo
60 60
     $list = new PageList([trim($options['page'])]);
61 61
 
62 62
     // delete Title from edited.txt
63
-    $file = __DIR__ . '/../resources/article_externRef_edited.txt';
63
+    $file = __DIR__.'/../resources/article_externRef_edited.txt';
64 64
     $text = file_get_contents($file);
65
-    $newText = str_replace(trim($argv[1]) . "\n", '', $text);
65
+    $newText = str_replace(trim($argv[1])."\n", '', $text);
66 66
     if (!empty($text) && $text !== $newText) {
67 67
         @file_put_contents($file, $newText);
68 68
     }
69
-    $botConfig->setTaskName('
Please login to merge, or discard this patch.