Passed
Push — dev ( eba0dc...b8ced8 )
by Dispositif
02:52
created
src/Domain/Publisher/ArticleFromURL.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
         if (!empty($articleData) && !empty($articleData['titre'])) {
98 98
             $article = WikiTemplateFactory::create('article');
99 99
             $article->hydrate($articleData);
100
-            if(!$article->hasParamValue('lire en ligne')) {
100
+            if (!$article->hasParamValue('lire en ligne')) {
101 101
                 $article->setParam('lire en ligne', $this->url);
102 102
             }
103 103
             return $article; // ok
Please login to merge, or discard this patch.
src/Domain/OuvrageOptimize.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         if (count($res) >= 2 && empty($auteur2)) {
187 187
             // delete author-params
188 188
             array_map(
189
-                function ($param) {
189
+                function($param) {
190 190
                     $this->unsetParam($param);
191 191
                 },
192 192
                 ['auteur', 'auteurs', 'prénom1', 'nom1']
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
         if (!empty($goo) && $goo !== $url) {
464 464
             $this->setParam($param, $goo);
465 465
             // cleaned tracking parameters in Google URL ?
466
-            if(GoogleLivresTemplate::isTrackingUrl($url)){
466
+            if (GoogleLivresTemplate::isTrackingUrl($url)) {
467 467
                 $this->log('tracking');
468 468
                 $this->notCosmetic = true;
469 469
             }
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
             // todo bug {{citation bloc}} si "=" ou "|" dans texte de citation
727 727
             // Legacy : use {{début citation}} ... {{fin citation}}
728 728
             if (preg_match('#[=|]#', $extrait) > 0) {
729
-                $this->ouvrage->externalTemplates[] = (object)[
729
+                $this->ouvrage->externalTemplates[] = (object) [
730 730
                     'template' => 'début citation',
731 731
                     '1' => '',
732 732
                     'raw' => '{{Début citation}}'.$extrait.'{{Fin citation}}',
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
                 $this->notCosmetic = true;
736 736
             } else {
737 737
                 // StdClass
738
-                $this->ouvrage->externalTemplates[] = (object)[
738
+                $this->ouvrage->externalTemplates[] = (object) [
739 739
                     'template' => 'citation bloc',
740 740
                     '1' => $extrait,
741 741
                     'raw' => '{{Citation bloc|'.$extrait.'}}',
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
         // "commentaire=bla" => {{Commentaire biblio|1=bla}}
752 752
         if ($this->hasParamValue('commentaire')) {
753 753
             $commentaire = $this->getParam('commentaire');
754
-            $this->ouvrage->externalTemplates[] = (object)[
754
+            $this->ouvrage->externalTemplates[] = (object) [
755 755
                 'template' => 'commentaire biblio',
756 756
                 '1' => $commentaire,
757 757
                 'raw' => '{{Commentaire biblio|'.$commentaire.'}}',
Please login to merge, or discard this patch.
src/Application/WikiBotConfig.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     const EXIT_ON_CHECK_WATCHPAGE = true;
31 31
 
32 32
     // do not stop if they play with {stop} on bot talk page
33
-    const BLACKLIST_EDITOR  = ['NB80'];
33
+    const BLACKLIST_EDITOR = ['NB80'];
34 34
 
35 35
     const BOT_FLAG = false;
36 36
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
                 "\n*** STOP ON TALK PAGE BY %s ***\n\n",
130 130
                 $lastEditor
131 131
             );
132
-            if(in_array($lastEditor, self::BLACKLIST_EDITOR)){
132
+            if (in_array($lastEditor, self::BLACKLIST_EDITOR)) {
133 133
                 return;
134 134
             }
135 135
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
      */
222 222
     public function minutesSinceLastEdit(string $title): int
223 223
     {
224
-        $time = $this->getTimestamp($title);  // 2011-09-02T16:31:13Z
224
+        $time = $this->getTimestamp($title); // 2011-09-02T16:31:13Z
225 225
 
226 226
         return (int) round((time() - strtotime($time)) / 60);
227 227
     }
Please login to merge, or discard this patch.
src/Application/AbstractBotTaskWorker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@
 block discarded – undo
173 173
             new EditInfo($this->taskName, $this->minorFlag, $this->botFlag, 5)
174 174
         );
175 175
         dump($result);
176
-        echo "Sleep ".(string)static::SLEEP_AFTER_EDITION."\n";
176
+        echo "Sleep ".(string) static::SLEEP_AFTER_EDITION."\n";
177 177
         sleep(static::SLEEP_AFTER_EDITION);
178 178
     }
179 179
 }
Please login to merge, or discard this patch.
src/Application/ZiziBotConfig.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $editInfo = new EditInfo(static::BOT_TALK_SUMMARY);
63 63
         $success = $page->addToBottomOfThePage($addText, $editInfo);
64 64
 
65
-        return (bool)$success;
65
+        return (bool) $success;
66 66
     }
67 67
 
68 68
     /**
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     private function generateTalkText(?string $toEditor = null, ?string $identation = ':')
76 76
     {
77
-        if($toEditor === 'Flow talk page manager'){
77
+        if ($toEditor === 'Flow talk page manager') {
78 78
             $toEditor = null;
79 79
         }
80 80
         $to = ($toEditor) ? sprintf('@[[User:%s|%s]] : ', $toEditor, $toEditor) : ''; // {{notif}}
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             return null;
128 128
         }
129 129
 
130
-        return (string)trim($sentences[array_rand($sentences)]);
130
+        return (string) trim($sentences[array_rand($sentences)]);
131 131
     }
132 132
 
133 133
     /**
Please login to merge, or discard this patch.
src/Application/CompleteProcess.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     public function __construct(QueueInterface $queueAdapter, ?bool $verbose = false)
53 53
     {
54 54
         $this->queueAdapter = $queueAdapter;
55
-        $this->verbose = (bool)$verbose;
55
+        $this->verbose = (bool) $verbose;
56 56
     }
57 57
 
58 58
     public function run(?int $limit = 10000)
Please login to merge, or discard this patch.
src/Application/Examples/CompleteWorker.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             sleep(60 * 60 * 3);
37 37
             echo "Wake up\n";
38 38
         }
39
-        if(strpos($e->getMessage(), 'Quota Google') !== false){
39
+        if (strpos($e->getMessage(), 'Quota Google') !== false) {
40 40
             echo "Google Quota dépassé : sleep 3h\n";
41 41
             sleep(60 * 60 * 3);
42 42
             echo "Wake up\n";
@@ -50,5 +50,5 @@  discard block
 block discarded – undo
50 50
     }
51 51
     unset($process);
52 52
     echo "Sleep 10 min\n";
53
-    sleep(60*10);
53
+    sleep(60 * 10);
54 54
 }
Please login to merge, or discard this patch.