Passed
Push — master ( dafac1...9ad278 )
by Dispositif
08:36
created
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/Application/AbstractBotTaskWorker.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
         $this->defaultTaskname = $bot->taskName;
86 86
 
87 87
         $analyzed = @file(static::ARTICLE_ANALYZED_FILENAME, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
88
-        $this->pastAnalyzed = ($analyzed !== false ) ? $analyzed : [];
88
+        $this->pastAnalyzed = ($analyzed !== false) ? $analyzed : [];
89 89
 
90 90
         // @throw exception on "Invalid CSRF token"
91
-        $this->run();//todo delete that and use (Worker)->run($duration) or process management
91
+        $this->run(); //todo delete that and use (Worker)->run($duration) or process management
92 92
     }
93 93
 
94 94
     protected function setUpInConstructor(): void
@@ -132,10 +132,10 @@  discard block
 block discarded – undo
132 132
     protected function titleProcess(string $title): void
133 133
     {
134 134
         echo "---------------------\n";
135
-        echo date('d-m-Y H:i'). ' '. Color::BG_CYAN."  $title ".Color::NORMAL."\n";
135
+        echo date('d-m-Y H:i').' '.Color::BG_CYAN."  $title ".Color::NORMAL."\n";
136 136
         sleep(1);
137 137
 
138
-        if(in_array($title, $this->pastAnalyzed)) {
138
+        if (in_array($title, $this->pastAnalyzed)) {
139 139
             echo "Skip : déjà analysé\n";
140 140
             return;
141 141
         }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         $this->titleBotFlag = static::TASK_BOT_FLAG;
145 145
 
146 146
         $text = $this->getText($title);
147
-        if( static::SKIP_LASTEDIT_BY_BOT && $this->pageAction->getLastEditor() === getenv('BOT_NAME') ) {
147
+        if (static::SKIP_LASTEDIT_BY_BOT && $this->pageAction->getLastEditor() === getenv('BOT_NAME')) {
148 148
             echo "Skip : déjà édité par le bot\n";
149 149
             return;
150 150
         }
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
         }
260 260
 
261 261
         dump($result);
262
-        echo "Sleep ".(string)static::SLEEP_AFTER_EDITION."\n";
262
+        echo "Sleep ".(string) static::SLEEP_AFTER_EDITION."\n";
263 263
         sleep(static::SLEEP_AFTER_EDITION);
264 264
     }
265 265
 
Please login to merge, or discard this patch.
src/Infrastructure/DbAdapter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@
 block discarded – undo
181 181
         return !empty($result);
182 182
     }
183 183
 
184
-    public function setLabel(string $title, ?int $val=0): bool
184
+    public function setLabel(string $title, ?int $val = 0): bool
185 185
     {
186 186
         try {
187 187
             $result = $this->db->update(
Please login to merge, or discard this patch.
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
      * @param string|null $url
33 33
      * @param array|null  $options
34 34
      */
35
-    public function __construct(?string $url = null, ?array $options=[])
35
+    public function __construct(?string $url = null, ?array $options = [])
36 36
     {
37 37
         $this->url = $url;
38 38
         $this->options = $options;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             $titles[] = trim($res['title']);
88 88
         }
89 89
 
90
-        if(isset($this->options['reverse']) && $this->options['reverse'] === true ) {
90
+        if (isset($this->options['reverse']) && $this->options['reverse'] === true) {
91 91
             krsort($titles);
92 92
         }
93 93
 
Please login to merge, or discard this patch.