@@ -37,25 +37,25 @@ discard block |
||
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 |
||
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 |
@@ -40,10 +40,10 @@ |
||
40 | 40 | $db = new Mysql($pdo); |
41 | 41 | |
42 | 42 | $monitor = $db->fetchRow('select count(id) from page_ouvrages where optidate is not null'); |
43 | -$number = (int)$monitor['count(id)']; |
|
43 | +$number = (int) $monitor['count(id)']; |
|
44 | 44 | |
45 | 45 | $monitor = $db->fetchRow('select count(distinct page) as pages from page_ouvrages where optidate is not null and isbn<>""'); |
46 | -$pageNb = (int)$monitor['pages']; |
|
46 | +$pageNb = (int) $monitor['pages']; |
|
47 | 47 | |
48 | 48 | $newText = <<<EOF |
49 | 49 | <div style="background:#EBF6E9;border:2px solid grey;padding:10px;border-radius:10px;"> |
@@ -23,7 +23,7 @@ |
||
23 | 23 | |
24 | 24 | public function hasWarning(): bool |
25 | 25 | { |
26 | - return (bool)$this->warning; |
|
26 | + return (bool) $this->warning; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
@@ -41,7 +41,7 @@ |
||
41 | 41 | { |
42 | 42 | $sender = getenv('BOT_NAME') ?? ''; |
43 | 43 | $message = sprintf('%s : %s', $sender, $message); |
44 | - $url = getenv('FREE_SMS_URL') . urlencode($message); |
|
44 | + $url = getenv('FREE_SMS_URL').urlencode($message); |
|
45 | 45 | |
46 | 46 | $response = $this->client->get($url, ['timeout' => 120]); |
47 | 47 |
@@ -58,7 +58,7 @@ |
||
58 | 58 | |
59 | 59 | |
60 | 60 | // utilise une liste d'import wstat.fr |
61 | - echo "Liste d'après wstat.fr\n"; |
|
61 | + echo "Liste d'après wstat.fr\n"; |
|
62 | 62 | $list = PageList::FromFile(__DIR__.'/../resources/importISBN_nov.txt'); |
63 | 63 | new ScanWiki2DB($wiki, new DbAdapter(), new WikiBotConfig($wiki), $list, 0); |
64 | 64 |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | } |
93 | 93 | if (preg_match('#^\[(http[^ \]]+) ([^]]+)]#i', $this->ouvrage->getParam($param), $matches) > 0) { |
94 | 94 | $this->ouvrage->setParam($param, str_replace($matches[0], $matches[2], $this->ouvrage->getParam($param))); |
95 | - $this->optiStatus->addSummaryLog('±' . $param); |
|
95 | + $this->optiStatus->addSummaryLog('±'.$param); |
|
96 | 96 | |
97 | 97 | if (in_array($param, ['titre', 'titre chapitre'])) { |
98 | 98 | if (empty($this->ouvrage->getParam('lire en ligne'))) { |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | return; |
103 | 103 | } |
104 | - $this->optiStatus->addSummaryLog('autre lien externe: ' . $matches[1]); |
|
104 | + $this->optiStatus->addSummaryLog('autre lien externe: '.$matches[1]); |
|
105 | 105 | } |
106 | 106 | } |
107 | 107 | } |
@@ -126,11 +126,11 @@ |
||
126 | 126 | { |
127 | 127 | $annee = $this->getParam('année'); |
128 | 128 | if (!empty($annee) && is_numeric($annee)) { |
129 | - return (int)$annee; |
|
129 | + return (int) $annee; |
|
130 | 130 | } |
131 | 131 | $date = $this->getParam('date'); |
132 | 132 | if ($date && preg_match('#[^0-9]?([12]\d\d\d)[^0-9]?#', $date, $matches) > 0) { |
133 | - return (int)$matches[1]; |
|
133 | + return (int) $matches[1]; |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | return null; |
@@ -29,19 +29,19 @@ discard block |
||
29 | 29 | // todo bug {{citation bloc}} si "=" ou "|" dans texte de citation |
30 | 30 | // Legacy : use {{début citation}} ... {{fin citation}} |
31 | 31 | if (preg_match('#[=|]#', $extrait) > 0) { |
32 | - $this->ouvrage->externalTemplates[] = (object)[ |
|
32 | + $this->ouvrage->externalTemplates[] = (object) [ |
|
33 | 33 | 'template' => 'début citation', |
34 | 34 | '1' => '', |
35 | - 'raw' => '{{Début citation}}' . $extrait . '{{Fin citation}}', |
|
35 | + 'raw' => '{{Début citation}}'.$extrait.'{{Fin citation}}', |
|
36 | 36 | ]; |
37 | 37 | $this->addSummaryLog('{Début citation}'); |
38 | 38 | $this->optiStatus->setNotCosmetic(true); |
39 | 39 | } else { |
40 | 40 | // StdClass |
41 | - $this->ouvrage->externalTemplates[] = (object)[ |
|
41 | + $this->ouvrage->externalTemplates[] = (object) [ |
|
42 | 42 | 'template' => 'citation bloc', |
43 | 43 | '1' => $extrait, |
44 | - 'raw' => '{{Citation bloc|' . $extrait . '}}', |
|
44 | + 'raw' => '{{Citation bloc|'.$extrait.'}}', |
|
45 | 45 | ]; |
46 | 46 | $this->addSummaryLog('{Citation bloc}'); |
47 | 47 | $this->optiStatus->setNotCosmetic(true); |
@@ -54,10 +54,10 @@ discard block |
||
54 | 54 | // "commentaire=bla" => {{Commentaire biblio|1=bla}} |
55 | 55 | if ($this->hasParamValue('commentaire')) { |
56 | 56 | $commentaire = $this->getParam('commentaire'); |
57 | - $this->ouvrage->externalTemplates[] = (object)[ |
|
57 | + $this->ouvrage->externalTemplates[] = (object) [ |
|
58 | 58 | 'template' => 'commentaire biblio', |
59 | 59 | '1' => $commentaire, |
60 | - 'raw' => '{{Commentaire biblio|' . $commentaire . '}}', |
|
60 | + 'raw' => '{{Commentaire biblio|'.$commentaire.'}}', |
|
61 | 61 | ]; |
62 | 62 | $this->unsetParam('commentaire'); |
63 | 63 | $this->addSummaryLog('{commentaire}'); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | foreach ($params as $param) { |
24 | 24 | if ( |
25 | 25 | $this->ouvrage->hasParamValue($param) |
26 | - && WikiTextUtil::isWikify(' ' . $this->ouvrage->getParam($param)) |
|
26 | + && WikiTextUtil::isWikify(' '.$this->ouvrage->getParam($param)) |
|
27 | 27 | ) { |
28 | 28 | $this->ouvrage->setParam($param, WikiTextUtil::unWikify($this->ouvrage->getParam($param))); |
29 | 29 | } |