| Conditions | 9 |
| Paths | 256 |
| Total Lines | 30 |
| Code Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 90 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | public function toJson() |
||
| 35 | { |
||
| 36 | $json = array(); |
||
| 37 | if ($this->registrationIds) { |
||
| 38 | $json['registration_ids'] = $this->registrationIds; |
||
| 39 | } |
||
| 40 | if ($this->collapseKey) { |
||
| 41 | $json['collapse_key'] = $this->collapseKey; |
||
| 42 | } |
||
| 43 | if ($this->data) { |
||
| 44 | $json['data'] = $this->data; |
||
| 45 | } |
||
| 46 | if ($this->notification) { |
||
| 47 | $json['notification'] = $this->notification; |
||
| 48 | } |
||
| 49 | if ($this->delayWhileIdle) { |
||
| 50 | $json['delay_while_idle'] = $this->delayWhileIdle; |
||
| 51 | } |
||
| 52 | if ($this->timeToLive != 2419200) { |
||
| 53 | $json['time_to_live'] = $this->timeToLive; |
||
| 54 | } |
||
| 55 | if ($this->restrictedPackageName) { |
||
| 56 | $json['restricted_package_name'] = $this->restrictedPackageName; |
||
| 57 | } |
||
| 58 | if ($this->dryRun) { |
||
| 59 | $json['dry_run'] = $this->dryRun; |
||
| 60 | } |
||
| 61 | |||
| 62 | return Json::encode($json); |
||
| 63 | } |
||
| 64 | } |
||
| 65 |
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.