| Conditions | 4 |
| Paths | 3 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php defined('SYSPATH') OR die('No direct script access.'); |
||
| 23 | 6 | public function set(Jam_Validated $model, $value, $is_changed) |
|
| 24 | { |
||
| 25 | 6 | if ($value AND strpos($value, 'twitter.com') === FALSE) |
|
| 26 | { |
||
| 27 | 2 | if (substr($value, 0, 1) === '@') |
|
| 28 | { |
||
| 29 | 1 | $value = substr($value, 1); |
|
| 30 | } |
||
| 31 | 2 | $value = 'http://twitter.com/'.$value; |
|
| 32 | } |
||
| 33 | 6 | return parent::set($model, $value, $is_changed); |
|
| 34 | } |
||
| 35 | |||
| 37 |
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.