1 | <?php |
||
17 | class RemoteFetcher implements PageFetcherInterface |
||
18 | { |
||
19 | |||
20 | protected $http; |
||
21 | |||
22 | /** |
||
23 | * @var string The base URL of the JSON index containing a list of commands |
||
24 | */ |
||
25 | protected $baseUrl = "https://api.github.com/repos/tldr-pages/tldr/contents/pages/index.json?ref=master"; |
||
26 | |||
27 | /** |
||
28 | * @var string URL template for fetching an individual page |
||
29 | */ |
||
30 | protected $pageInfoUrlTemplate = |
||
31 | "https://api.github.com/repos/tldr-pages/tldr/contents/pages/{os}/{command}.md?ref=master"; |
||
32 | |||
33 | /** |
||
34 | * @var CacheWriterInterface |
||
35 | */ |
||
36 | private $cacheWriter; |
||
37 | |||
38 | /** |
||
39 | * RemoteFetcher constructor. |
||
40 | * |
||
41 | * @param \GuzzleHttp\Client $http |
||
42 | */ |
||
43 | public function __construct(Client $http, CacheWriterInterface $cacheWriter = null) |
||
48 | |||
49 | /** |
||
50 | * Fetch a page from remote repository |
||
51 | * |
||
52 | * @param string $page |
||
|
|||
53 | * @return string |
||
54 | * @throws PageNotFoundException |
||
55 | */ |
||
56 | public function fetchPage(String $pageName): TldrPage |
||
92 | } |
||
93 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.