| 1 | <?php |
||
| 5 | class DataReceiver |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * The id from update requests. |
||
| 9 | * |
||
| 10 | * @var int |
||
| 11 | */ |
||
| 12 | protected $id; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * The Endpoint object. |
||
| 16 | * |
||
| 17 | * @var Endpoint |
||
| 18 | */ |
||
| 19 | protected $endpoint; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * The request data. |
||
| 23 | * |
||
| 24 | * @var array |
||
| 25 | */ |
||
| 26 | protected $data; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Create a new DataReceiver instance. |
||
| 30 | * |
||
| 31 | * @param string $method |
||
|
|
|||
| 32 | * @param string $uri |
||
| 33 | * @param int $id |
||
| 34 | */ |
||
| 35 | 24 | public function __construct(Endpoint $endpoint, $id = null) |
|
| 41 | |||
| 42 | /** |
||
| 43 | * Fill all the request data. |
||
| 44 | * |
||
| 45 | * @param array $data |
||
| 46 | * |
||
| 47 | * @return self |
||
| 48 | */ |
||
| 49 | 3 | public function fill(array $data) |
|
| 57 | |||
| 58 | /** |
||
| 59 | * Get the request data. |
||
| 60 | * |
||
| 61 | * @return array |
||
| 62 | */ |
||
| 63 | 21 | public function toArray() |
|
| 69 | |||
| 70 | /** |
||
| 71 | * Run the save request. |
||
| 72 | * |
||
| 73 | * @return stdClass |
||
| 74 | */ |
||
| 75 | 21 | public function save() |
|
| 79 | |||
| 80 | /** |
||
| 81 | * Get the request id. |
||
| 82 | * |
||
| 83 | * @return int |
||
| 84 | */ |
||
| 85 | 12 | public function getId() |
|
| 89 | |||
| 90 | /** |
||
| 91 | * Set a specific data point. |
||
| 92 | * |
||
| 93 | * @param string $name |
||
| 94 | * @param string $value |
||
| 95 | */ |
||
| 96 | 24 | public function __set($name, $value = null) |
|
| 100 | |||
| 101 | /** |
||
| 102 | * Get a specific data point. |
||
| 103 | * |
||
| 104 | * @param string $name |
||
| 105 | * |
||
| 106 | * @return mixed |
||
| 107 | */ |
||
| 108 | 3 | public function __get($name) |
|
| 112 | } |
||
| 113 |
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
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.