Completed
Push — master ( c4ce9d...69540b )
by Dispositif
03:31
created
src/Application/Examples/CompleteProcess.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -147,14 +147,14 @@  discard block
 block discarded – undo
147 147
         }
148 148
 
149 149
         try {
150
-            if(!$this->skipGoogle()){
150
+            if (!$this->skipGoogle()) {
151 151
                 dump('GOOGLE...');
152 152
                 $googleOuvrage = OuvrageFactory::GoogleFromIsbn($isbn);
153 153
                 $this->completeOuvrage($googleOuvrage);
154 154
             }
155 155
         } catch (Throwable $e) {
156 156
             echo "*** ERREUR GOOGLE Isbn Search ***".$e->getMessage()."\n";
157
-            if(strpos($e->getMessage(),'Daily Limit Exceeded') !== true ){
157
+            if (strpos($e->getMessage(), 'Daily Limit Exceeded') !== true) {
158 158
                 echo "sleep 1h\n";
159 159
                 sleep(60 * 60);
160 160
                 echo "Try goto\n";
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
             //            $this->completeOuvrage($googleOuvrage);
192 192
         } catch (Throwable $e) {
193 193
             echo "*** ERREUR GOOGLE QuerySearch *** ".$e->getMessage()."\n";
194
-            sleep(60*30);
194
+            sleep(60 * 30);
195 195
             goto onlineQuerySearch;
196 196
         }
197 197
     }
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
             'modifs' => mb_substr(implode(',', $this->log), 0, 250),
227 227
             'notcosmetic' => ($this->notCosmetic) ? 1 : 0,
228 228
             'major' => ($this->major) ? 1 : 0,
229
-            'isbn' => substr($isbn13,0,20),
229
+            'isbn' => substr($isbn13, 0, 20),
230 230
             'version' => Bot::getGitVersion() ?? null,
231 231
         ];
232 232
         dump($finalData);
Please login to merge, or discard this patch.
src/Application/ZiziBot.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         $editInfo = new EditInfo(static::BOT_TALK_SUMMARY);
54 54
         $success = $page->addToBottomOfThePage($addText, $editInfo);
55 55
 
56
-        return (bool)$success;
56
+        return (bool) $success;
57 57
     }
58 58
 
59 59
     /**
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     {
68 68
         $to = ($toEditor) ? sprintf('@%s : ', $toEditor) : ''; // {{notif}}
69 69
         $sentence = TextUtil::mb_ucfirst($this->getRandomSentence());
70
-        if(!$sentence){
70
+        if (!$sentence) {
71 71
             throw new \Exception('no sentence');
72 72
         }
73 73
         $addText = sprintf('%s%s%s --~~~~', $identation, $to, $sentence);
@@ -78,10 +78,10 @@  discard block
 block discarded – undo
78 78
     private function getRandomSentence(): ?string
79 79
     {
80 80
         $sentences = file(self::BOT_TALK_FILE);
81
-        if(!$sentences){
81
+        if (!$sentences) {
82 82
             return null;
83 83
         }
84
-        return (string)trim($sentences[array_rand($sentences)]);
84
+        return (string) trim($sentences[array_rand($sentences)]);
85 85
     }
86 86
 
87 87
     /**
Please login to merge, or discard this patch.
src/Application/WikiPageAction.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     public function getRedirect(): ?string
96 96
     {
97 97
         if (preg_match('/^#REDIRECT(?:ION)? ?\[\[([^]]+)]]/i', $this->getText(), $matches)) {
98
-            return (string)trim($matches[1]);
98
+            return (string) trim($matches[1]);
99 99
         }
100 100
 
101 101
         return null;
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
         $parser = new TagParser(); // todo ParserFactory
228 228
         $refs = $parser->importHtml($text)->getRefValues(); // []
229 229
 
230
-        return (array)$refs;
230
+        return (array) $refs;
231 231
     }
232 232
 
233 233
     /**
Please login to merge, or discard this patch.