| Conditions | 5 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | public function setInput($input = array(), $key = null) |
||
| 28 | { |
||
| 29 | assert(is_array($input)); |
||
| 30 | assert(is_string($key) || is_null($key)); |
||
| 31 | if (is_null($key)) { |
||
| 32 | foreach ($input as $key => $value) { |
||
| 33 | $this->addInput($key, $value); |
||
| 34 | } |
||
| 35 | } elseif (array_key_exists($key, $this->testData)) { |
||
| 36 | $this->testData[$key] = $input; |
||
| 37 | } else { |
||
| 38 | $this->addInput($key, $input); |
||
| 39 | } |
||
| 40 | } |
||
| 41 | |||
| 70 |
This check looks for
@paramannotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.