1 | <?php defined('SYSPATH') OR die('No direct script access.'); |
||
15 | abstract class Kohana_Jam_Field_Serialized extends Jam_Field { |
||
16 | |||
17 | public static $allowed = array('native', 'json', 'csv', 'query'); |
||
18 | |||
19 | public $method = 'native'; |
||
20 | |||
21 | public function initialize(Jam_Meta $meta, $name) |
||
28 | |||
29 | /** |
||
30 | * Unserializes data as soon as it comes in. |
||
31 | * |
||
32 | * Incoming data that isn't actually serialized will not be harmed. |
||
33 | * |
||
34 | * @param mixed $value |
||
35 | * @return mixed |
||
36 | */ |
||
37 | 3 | public function set(Jam_Validated $model, $value, $is_changed) |
|
51 | |||
52 | /** |
||
53 | * Saves the value as a serialized string. |
||
54 | * |
||
55 | * @param Jam_Model $model |
||
56 | * @param mixed $value |
||
57 | * @param boolean $loaded |
||
|
|||
58 | * @return null|string |
||
59 | */ |
||
60 | public function convert(Jam_Validated $model, $value, $is_loaded) |
||
69 | |||
70 | public function serialize($value) |
||
87 | |||
88 | 2 | public function unserialize($value) |
|
106 | |||
107 | } // Kohana_Jam_Field_Serialized |
||
108 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.