@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | { |
24 | 24 | protected HttpClientInterface $client; |
25 | 25 | |
26 | - public function __construct(private readonly LoggerInterface|NullLogger $log = new NullLogger()) |
|
26 | + public function __construct(private readonly LoggerInterface | NullLogger $log = new NullLogger()) |
|
27 | 27 | { |
28 | 28 | $this->client = ServiceFactory::getHttpClient(); |
29 | 29 | } |
@@ -38,16 +38,16 @@ discard block |
||
38 | 38 | { |
39 | 39 | $url = 'http://wikipedia.ramselehof.de/wikiblame.php?project=wikipedia&article=' |
40 | 40 | . str_replace(' ', '+', $article) |
41 | - . '&needle=' . urlencode($string) |
|
41 | + . '&needle='.urlencode($string) |
|
42 | 42 | . '&lang=fr&limit=2000&offjahr=2024&offmon=1&offtag=1&offhour=23&offmin=55' |
43 | 43 | . '&searchmethod=int&order=desc' |
44 | - . '&force_wikitags=' . ($hasWikicode ? 'on' : 'off') |
|
44 | + . '&force_wikitags='.($hasWikicode ? 'on' : 'off') |
|
45 | 45 | . '&user_lang=fr&ignorefirst=0'; |
46 | 46 | |
47 | 47 | $response = $this->client->get($url); |
48 | 48 | |
49 | 49 | if ($response->getStatusCode() !== 200) { |
50 | - $this->log->warning('WikiBlame: ' . $response->getStatusCode() . ' ' . $response->getReasonPhrase()); |
|
50 | + $this->log->warning('WikiBlame: '.$response->getStatusCode().' '.$response->getReasonPhrase()); |
|
51 | 51 | return null; |
52 | 52 | } |
53 | 53 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | return [ |
71 | - 'versionid' => (int)$matches[1], |
|
71 | + 'versionid' => (int) $matches[1], |
|
72 | 72 | 'dateraw' => $matches[2], |
73 | 73 | 'datetime' => DateUtil::simpleFrench2object($matches[2]), |
74 | 74 | ]; |