Passed
Push — master ( 8c018f...e6de3a )
by Dispositif
02:50
created
src/Infrastructure/PageList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
             }
59 59
         }
60 60
 
61
-        return new PageList((array)$titles);
61
+        return new PageList((array) $titles);
62 62
     }
63 63
 
64 64
     /**
Please login to merge, or discard this patch.
src/Application/Examples/externRefProcess.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
 //echo count($titles)." titles\n";
77 77
 $edited = file(__DIR__.'/../resources/article_externRef_edited.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
78 78
 $filtered = array_diff($titles, $edited);
79
-$list = new PageList( $filtered );
79
+$list = new PageList($filtered);
80 80
 echo ">".$list->count()." dans liste\n";
81 81
 
82 82
 new ExternRefWorker($botConfig, $wiki, $list);
Please login to merge, or discard this patch.
src/Application/Examples/botstats.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -37,25 +37,25 @@  discard block
 block discarded – undo
37 37
 $data = [];
38 38
 
39 39
 $monitor = $db->fetchRow('select count(id) from page_ouvrages where optidate is null and edited is null and skip=0');
40
-$data['not analyzed citation'] = (int)$monitor['count(id)'];
40
+$data['not analyzed citation'] = (int) $monitor['count(id)'];
41 41
 
42 42
 $monitor = $db->fetchRow('select count(id) from page_ouvrages where optidate is not null');
43
-$data['analyzed citation'] = (int)$monitor['count(id)'];
43
+$data['analyzed citation'] = (int) $monitor['count(id)'];
44 44
 
45 45
 $monitor = $db->fetchRow('select count(distinct page) as n from page_ouvrages where skip=1 and edited is null'); //  ?
46
-$data['skip pages'] = (int)$monitor['n'];
46
+$data['skip pages'] = (int) $monitor['n'];
47 47
 
48 48
 $monitor = $db->fetchRow('select count(distinct page) as n from page_ouvrages where edited is true');
49
-$data['edited pages'] = (int)$monitor['n'];
49
+$data['edited pages'] = (int) $monitor['n'];
50 50
 
51 51
 $monitor = $db->fetchRow('select count(id) from page_ouvrages where optidate > SUBDATE(NOW(),1)');
52
-$data['analyzed citation 24H'] = (int)$monitor['count(id)'];
52
+$data['analyzed citation 24H'] = (int) $monitor['count(id)'];
53 53
 
54 54
 $monitor = $db->fetchRow('select count(id) as n from page_ouvrages where edited > SUBDATE(NOW(),1)');
55
-$data['edited citations 24H'] = (int)$monitor['n'];
55
+$data['edited citations 24H'] = (int) $monitor['n'];
56 56
 
57 57
 $monitor = $db->fetchRow('select count(distinct page) as n from page_ouvrages where edited > SUBDATE(NOW(),1)');
58
-$data['edited pages 24H'] = (int)$monitor['n'];
58
+$data['edited pages 24H'] = (int) $monitor['n'];
59 59
 
60 60
 $monitor = $db->fetchRow(
61 61
     'SELECT count(distinct A.page) FROM page_ouvrages A
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                     AND A.page = B.page
75 75
                     )'
76 76
 );
77
-$data['waiting pages'] = (int)$monitor['count(distinct A.page)'];
77
+$data['waiting pages'] = (int) $monitor['count(distinct A.page)'];
78 78
 
79 79
 $data['currentdate'] = DateUtil::english2french((new DateTime())->format('j F Y \à H\:i').' (CEST)');
80 80
 
Please login to merge, or discard this patch.
src/Application/VoteAdmin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             throw new ConfigException('Pas de phrases disponibles');
107 107
         }
108 108
 
109
-        return (string)trim($sentences[array_rand($sentences)]);
109
+        return (string) trim($sentences[array_rand($sentences)]);
110 110
     }
111 111
 
112 112
     private function generateVoteInsertionText(): ?string
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
         $html = $this->getAdminScoreHtml();
268 268
 
269 269
         if (!empty($html) && preg_match('#<th>Total</th>[^<]*<th>(\d+)</th>#', $html, $matches)) {
270
-            return (int)$matches[1];
270
+            return (int) $matches[1];
271 271
         }
272 272
 
273 273
         return null;
Please login to merge, or discard this patch.
src/Application/AbstractQueueWorker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         $channel->basic_qos(null, 1, null);
37 37
         // callback to $this->msgProcess().
38 38
         // TODO check Rector refac
39
-        $channel->basic_consume(static::QUEUE_NAME, '', false, false, false, false, function (\PhpAmqpLib\Message\AMQPMessage $msg) : void {
39
+        $channel->basic_consume(static::QUEUE_NAME, '', false, false, false, false, function(\PhpAmqpLib\Message\AMQPMessage $msg) : void {
40 40
             $this->msgProcess($msg);
41 41
         });
42 42
 
Please login to merge, or discard this patch.
src/Infrastructure/GoogleApiQuota.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     {
55 55
         $data = $this->getFileData();
56 56
         $this->lastDate = new DateTime($data['date'], new DateTimeZone(static::REBOOT_TIMEZONE));
57
-        $this->count = (int)$data['count'];
57
+        $this->count = (int) $data['count'];
58 58
 
59 59
         // Today reboot date/time of the quota
60 60
         $todayBoot = new DateTime();
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
         try {
78 78
             $json = file_get_contents(static::JSON_FILENAME);
79
-            $array = (array)json_decode($json, true, 512, JSON_THROW_ON_ERROR);
79
+            $array = (array) json_decode($json, true, 512, JSON_THROW_ON_ERROR);
80 80
         } catch (Throwable $e) {
81 81
             throw new ConfigException('Error on Google Quota file : reading or JSON malformed.');
82 82
         }
Please login to merge, or discard this patch.
src/Domain/Publisher/BnfMapper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $this->xml = $xml;
41 41
 
42 42
         // skip multi-records
43
-        $nbResults = (int)$xml->xpath('//srw:numberOfRecords[1]')[0] ?? 0;
43
+        $nbResults = (int) $xml->xpath('//srw:numberOfRecords[1]')[0] ?? 0;
44 44
         if (1 !== $nbResults) {
45 45
             echo "BNF : $nbResults records (skip)\n";
46 46
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         $res = [];
127 127
         foreach ($elements as $element) {
128 128
             if (isset($element) && $element instanceof SimpleXMLElement) {
129
-                $res[] = (string)$element;
129
+                $res[] = (string) $element;
130 130
             }
131 131
         }
132 132
 
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
     {
195 195
         $raw = $this->xpath2string('//mxc:datafield[@tag="215"]/mxc:subfield[@code="a"]');
196 196
         if (!empty($raw) && preg_match('#(\d{2,}) p\.#', $raw, $matches) > 0) {
197
-            return (string)$matches[1];
197
+            return (string) $matches[1];
198 198
         }
199 199
 
200 200
         return null;
Please login to merge, or discard this patch.
src/Domain/Models/Wiki/ArticleTemplate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
     {
60 60
         // Style "auto1234"
61 61
         if (empty($this->getParam('périodique') || empty($this->getParam('date')))) {
62
-            return 'auto'.(string)random_int(1000, 9999);
62
+            return 'auto'.(string) random_int(1000, 9999);
63 63
         }
64 64
         // Style "LeMonde15022017"
65 65
         $periodique = str_replace(
Please login to merge, or discard this patch.
src/Domain/Models/Wiki/BiblioTemplateTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
             $id .= ($this->getParam('nom'.$i)) ?? $this->getParam('auteur'.$i) ?? '';
52 52
         }
53 53
 
54
-        return $id . ($this->getParam('année') ?? '');
54
+        return $id.($this->getParam('année') ?? '');
55 55
     }
56 56
 
57 57
 }
Please login to merge, or discard this patch.