1 | <?php |
||
10 | class PagesRepository extends Repository |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * Get metadata about a single page from the API. |
||
15 | * @param Project $project The project to which the page belongs. |
||
16 | * @param string $pageTitle Page title. |
||
17 | * @param boolean $followRedirects Whether or not to resolve redirects |
||
18 | * @return string[] Array with some of the following keys: pageid, title, missing, displaytitle, |
||
19 | * url. |
||
20 | */ |
||
21 | public function getPageInfo(Project $project, $pageTitle, $followRedirects = true) |
||
26 | |||
27 | /** |
||
28 | * Get metadata about a set of pages from the API. |
||
29 | * @param Project $project The project to which the pages belong. |
||
30 | * @param string[] $pageTitles Array of page titles. |
||
31 | * @param boolean $followRedirects Whether or not to resolve redirects |
||
32 | * @return string[] Array keyed by the page names, each element with some of the |
||
33 | * following keys: pageid, title, missing, displaytitle, url. |
||
34 | */ |
||
35 | public function getPagesInfo(Project $project, $pageTitles, $followRedirects = true) |
||
63 | } |
||
64 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.