1 | <?php |
||
5 | class Github extends AbstractOrigin implements OriginInterface |
||
6 | { |
||
7 | /** |
||
8 | * The name of the origin. |
||
9 | * |
||
10 | * @var string |
||
11 | */ |
||
12 | public $name = 'Github'; |
||
13 | |||
14 | /** |
||
15 | * Determines whether or not the Request originated from Github. |
||
16 | * |
||
17 | * @param Illuminate\Http\Request $this->request The Request object |
||
|
|||
18 | * |
||
19 | * @return bool Returns true if the request originated from Github. False otherwise. |
||
20 | */ |
||
21 | 18 | public function originated() |
|
33 | |||
34 | /** |
||
35 | * Verifies the authenticity of a webhook request from Github. |
||
36 | * |
||
37 | * Follows the procedure described here: https://developer.github.com/webhooks/securing/ |
||
38 | * |
||
39 | * @param Illuminate\Http\Request $this->request The Request object |
||
40 | * |
||
41 | * @return bool Returns true if the request is authentic. False otherwise. |
||
1 ignored issue
–
show
|
|||
42 | */ |
||
43 | 4 | public function verify() |
|
54 | |||
55 | /** |
||
56 | * Gets the event the triggered the webhook request. |
||
57 | * |
||
58 | * @param Illuminate\Http\Request $this->request The Request object |
||
59 | * |
||
60 | * @return string The name of the event, e.g. push, release, create, etc. |
||
61 | */ |
||
62 | 2 | public function event() |
|
66 | |||
67 | /** |
||
68 | * Gets the URL to be cloned from. |
||
69 | * |
||
70 | * @param Illuminate\Http\Request $request The Request object |
||
71 | * |
||
72 | * @return string The URL of the repo. |
||
73 | */ |
||
74 | 36 | public function getRepoUrl() |
|
78 | |||
79 | /** |
||
80 | * Gets the ID of the commit that is to be cloned. |
||
81 | * |
||
82 | * @param Illuminate\Http\Request $request The Request object |
||
83 | * |
||
84 | * @return string The commit ID. |
||
85 | */ |
||
86 | 36 | public function getCommitId() |
|
90 | } |
||
91 |
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.