@@ -5,7 +5,6 @@ |
||
5 | 5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
6 | 6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
7 | 7 | use Symfony\Component\HttpFoundation\Request; |
8 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
9 | 8 | use DateTime; |
10 | 9 | |
11 | 10 | class AdminScoreController extends Controller |
@@ -380,7 +380,6 @@ |
||
380 | 380 | |
381 | 381 | /** |
382 | 382 | * Get the size of the diff |
383 | - * @param int $rev The index of the revision within $this->pageHistory |
|
384 | 383 | * @return int Size of the diff |
385 | 384 | */ |
386 | 385 | private function getDiffSize($revIndex) |
@@ -6,11 +6,7 @@ |
||
6 | 6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
7 | 7 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
8 | 8 | use Symfony\Component\HttpFoundation\Request; |
9 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
10 | 9 | use Symfony\Component\DependencyInjection\ContainerInterface; |
11 | -use AppBundle\Helper\Apihelper; |
|
12 | -use AppBundle\Helper\PageviewsHelper; |
|
13 | -use AppBundle\Helper\AutomatedEditsHelper; |
|
14 | 10 | |
15 | 11 | class ArticleInfoController extends Controller |
16 | 12 | { |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
6 | 6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
7 | -use Symfony\Component\HttpFoundation\Request; |
|
8 | 7 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
9 | 8 | |
10 | 9 | class DefaultController extends Controller |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
6 | 6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
7 | 7 | use Symfony\Component\HttpFoundation\Request; |
8 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
9 | 8 | |
10 | 9 | class PagesController extends Controller |
11 | 10 | { |
@@ -4,9 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
6 | 6 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
7 | -use Symfony\Component\Config\Definition\Exception\Exception; |
|
8 | 7 | use Symfony\Component\HttpFoundation\Request; |
9 | -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
10 | 8 | |
11 | 9 | class SimpleEditCounterController extends Controller |
12 | 10 | { |
@@ -25,6 +25,9 @@ |
||
25 | 25 | $this->container = $container; |
26 | 26 | } |
27 | 27 | |
28 | + /** |
|
29 | + * @param string $tool |
|
30 | + */ |
|
28 | 31 | public function checkEnabled($tool) |
29 | 32 | { |
30 | 33 | if (!$this->container->getParameter("enable.$tool")) { |
@@ -157,7 +157,7 @@ |
||
157 | 157 | /** |
158 | 158 | * Get links to pageviews tools for the given page |
159 | 159 | * @param string $title Title of page |
160 | - * @param string $projectUrl Project domain such as en.wikipedia.org |
|
160 | + * @param string $project Project domain such as en.wikipedia.org |
|
161 | 161 | * @return string Markup |
162 | 162 | */ |
163 | 163 | public function pageviewsLinks($title, $project) |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | * Adds a mandatory requirement in form of a php.ini configuration. |
224 | 224 | * |
225 | 225 | * @param string $cfgName The configuration name used for ini_get() |
226 | - * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, |
|
226 | + * @param boolean|string $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, |
|
227 | 227 | * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement |
228 | 228 | * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. |
229 | 229 | * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | * Adds an optional recommendation in form of a php.ini configuration. |
242 | 242 | * |
243 | 243 | * @param string $cfgName The configuration name used for ini_get() |
244 | - * @param bool|callback $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, |
|
244 | + * @param string|false $evaluation Either a boolean indicating whether the configuration should evaluate to true or false, |
|
245 | 245 | * or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement |
246 | 246 | * @param bool $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false. |
247 | 247 | * This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin. |
@@ -34,6 +34,9 @@ discard block |
||
34 | 34 | } |
35 | 35 | } |
36 | 36 | |
37 | + /** |
|
38 | + * @param string $username |
|
39 | + */ |
|
37 | 40 | public function groups($project, $username) |
38 | 41 | { |
39 | 42 | $cacheKey = "groups.$project.$username"; |
@@ -59,6 +62,9 @@ discard block |
||
59 | 62 | return $result; |
60 | 63 | } |
61 | 64 | |
65 | + /** |
|
66 | + * @param string $username |
|
67 | + */ |
|
62 | 68 | public function globalGroups($project, $username) |
63 | 69 | { |
64 | 70 | $cacheKey = "globalgroups.$project.$username"; |
@@ -363,7 +369,7 @@ discard block |
||
363 | 369 | * Adapted from https://github.com/MusikAnimal/pageviews |
364 | 370 | * @param array $params Associative array of params to pass to API |
365 | 371 | * @param string $project Project to query, e.g. en.wikipedia.org |
366 | - * @param string|func $dataKey The key for the main chunk of data, in the query hash |
|
372 | + * @param \Closure $dataKey The key for the main chunk of data, in the query hash |
|
367 | 373 | * (e.g. 'categorymembers' for API:Categorymembers). |
368 | 374 | * If this is a function it is given the response data, |
369 | 375 | * and expected to return the data we want to concatentate. |
@@ -2,11 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace AppBundle\Helper; |
4 | 4 | |
5 | -use DateInterval; |
|
6 | 5 | use Mediawiki\Api\MediawikiApi; |
7 | 6 | use Mediawiki\Api\SimpleRequest; |
8 | 7 | use Mediawiki\Api\FluentRequest; |
9 | -use Psr\Cache\CacheItemPoolInterface; |
|
10 | 8 | use Symfony\Component\Config\Definition\Exception\Exception; |
11 | 9 | use Symfony\Component\DependencyInjection\ContainerInterface; |
12 | 10 |