1 | <?php |
||
11 | class UnitOfWork |
||
12 | { |
||
13 | /** |
||
14 | * mapping |
||
15 | * |
||
16 | * @var Mapping |
||
17 | * @access private |
||
18 | */ |
||
19 | private $mapping; |
||
20 | |||
21 | /** |
||
22 | * storage for every entity retrieved |
||
23 | * |
||
24 | * @var array |
||
25 | */ |
||
26 | private $storage; |
||
27 | |||
28 | /** |
||
29 | * Constructor. |
||
30 | */ |
||
31 | public function __construct(Mapping $mapping) |
||
36 | |||
37 | /** |
||
38 | * getDirtyData |
||
39 | * |
||
40 | * return the new serialized model with only needed fields to update |
||
41 | * |
||
42 | * @param array $newSerializedModel |
||
43 | * @param array $oldSerializedModel |
||
44 | * @param ClassMetadata $classMetadata |
||
45 | * @access public |
||
46 | * @return array |
||
47 | */ |
||
48 | public function getDirtyData(array $newSerializedModel, array $oldSerializedModel, ClassMetadata $classMetadata) |
||
52 | |||
53 | /** |
||
54 | * registerClean |
||
55 | * |
||
56 | * @param string $id |
||
57 | * @param object $entity |
||
58 | * @access public |
||
59 | * @return UnitOfWork |
||
60 | */ |
||
61 | public function registerClean($id, $entity) |
||
70 | |||
71 | /** |
||
72 | * getDirtyEntity |
||
73 | * |
||
74 | * @param string $id |
||
75 | * @access public |
||
76 | * @return mixed |
||
77 | */ |
||
78 | public function getDirtyEntity($id) |
||
85 | |||
86 | /** |
||
87 | * clear |
||
88 | * |
||
89 | * @param string $id |
||
90 | * @access public |
||
91 | * @return UnitOfWork |
||
92 | */ |
||
93 | public function clear($id) |
||
98 | |||
99 | /** |
||
100 | * getDirtyFields |
||
101 | * |
||
102 | * compares serialize object and returns only modified fields |
||
103 | * |
||
104 | * @param array $newArrayModel |
||
|
|||
105 | * @param array $oldSerializedModel |
||
106 | * @param ClassMetadata $classMetadata |
||
107 | * @access private |
||
108 | * @return array |
||
109 | */ |
||
110 | private function getDirtyFields(array $newSerializedModel, array $oldSerializedModel, ClassMetadata $classMetadata = null) |
||
147 | |||
148 | /** |
||
149 | * addIdentifiers |
||
150 | * |
||
151 | * add defined identifiers to given model |
||
152 | * |
||
153 | * @param array $newSerializedModel |
||
154 | * @param array $dirtyFields |
||
155 | * @access private |
||
156 | * @return array |
||
157 | */ |
||
158 | private function addIdentifiers($newSerializedModel, $dirtyFields, $idSerializedKey = null) |
||
170 | } |
||
171 |
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
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.