@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | * Returns matches. |
21 | 21 | * |
22 | 22 | * @param $input |
23 | - * @param $matches |
|
23 | + * @param string[] $matches |
|
24 | 24 | * |
25 | 25 | * @return int |
26 | 26 | */ |
@@ -85,6 +85,9 @@ discard block |
||
85 | 85 | return $this->userSectionFound; |
86 | 86 | } |
87 | 87 | |
88 | + /** |
|
89 | + * @param string $sectionName |
|
90 | + */ |
|
88 | 91 | public function getSection($sectionName) { |
89 | 92 | $sectionName = strtolower($sectionName); |
90 | 93 | if (!isset($this->data[$sectionName])) { |
@@ -89,8 +89,7 @@ |
||
89 | 89 | $sectionName = strtolower($sectionName); |
90 | 90 | if (!isset($this->data[$sectionName])) { |
91 | 91 | return []; |
92 | - } |
|
93 | - else { |
|
92 | + } else { |
|
94 | 93 | return $this->data[$sectionName]; |
95 | 94 | } |
96 | 95 | } |
@@ -489,7 +489,9 @@ |
||
489 | 489 | */ |
490 | 490 | public function quote() |
491 | 491 | { |
492 | - if (!$this->container->getParameter("enable.bash")) return ""; |
|
492 | + if (!$this->container->getParameter("enable.bash")) { |
|
493 | + return ""; |
|
494 | + } |
|
493 | 495 | $quotes = $this->container->getParameter('quotes'); |
494 | 496 | $id = array_rand($quotes); |
495 | 497 | return $quotes[$id]; |
@@ -363,8 +363,7 @@ |
||
363 | 363 | foreach($res["query"]["pages"] as $key => $value) { |
364 | 364 | if(isset($value["revisions"][0]["*"])) { |
365 | 365 | $result[$value["title"]] = $value["revisions"][0]["*"]; |
366 | - } |
|
367 | - else { |
|
366 | + } else { |
|
368 | 367 | $result[$value["title"]] = ""; |
369 | 368 | } |
370 | 369 | } |
@@ -208,8 +208,7 @@ |
||
208 | 208 | |
209 | 209 | try { |
210 | 210 | $api = MediawikiApi::newFromPage($projectUrl); |
211 | - } |
|
212 | - catch (\Exception $e) { |
|
211 | + } catch (\Exception $e) { |
|
213 | 212 | return null; |
214 | 213 | } |
215 | 214 |