17
17
class PreUpdateEventArgs extends LifecycleEventArgs
18
18
{
19
19
/** @var array<string, array{mixed, mixed}|PersistentCollection> */
20
- private $ entityChangeSet ;
20
+ private array $ entityChangeSet ;
21
21
22
22
/**
23
23
* @param object $entity
@@ -37,31 +37,25 @@ public function __construct($entity, EntityManagerInterface $em, array &$changeS
37
37
* @return mixed[][]
38
38
* @psalm-return array<string, array{mixed, mixed}|PersistentCollection>
39
39
*/
40
- public function getEntityChangeSet ()
40
+ public function getEntityChangeSet (): array
41
41
{
42
42
return $ this ->entityChangeSet ;
43
43
}
44
44
45
45
/**
46
46
* Checks if field has a changeset.
47
- *
48
- * @param string $field
49
- *
50
- * @return bool
51
47
*/
52
- public function hasChangedField ($ field )
48
+ public function hasChangedField (string $ field ): bool
53
49
{
54
50
return isset ($ this ->entityChangeSet [$ field ]);
55
51
}
56
52
57
53
/**
58
54
* Gets the old value of the changeset of the changed field.
59
55
*
60
- * @param string $field
61
- *
62
56
* @return mixed
63
57
*/
64
- public function getOldValue ($ field )
58
+ public function getOldValue (string $ field )
65
59
{
66
60
$ this ->assertValidField ($ field );
67
61
@@ -71,11 +65,9 @@ public function getOldValue($field)
71
65
/**
72
66
* Gets the new value of the changeset of the changed field.
73
67
*
74
- * @param string $field
75
- *
76
68
* @return mixed
77
69
*/
78
- public function getNewValue ($ field )
70
+ public function getNewValue (string $ field )
79
71
{
80
72
$ this ->assertValidField ($ field );
81
73
@@ -84,13 +76,8 @@ public function getNewValue($field)
84
76
85
77
/**
86
78
* Sets the new value of this field.
87
- *
88
- * @param string $field
89
- * @param mixed $value
90
- *
91
- * @return void
92
79
*/
93
- public function setNewValue ($ field , $ value )
80
+ public function setNewValue (string $ field , mixed $ value ): void
94
81
{
95
82
$ this ->assertValidField ($ field );
96
83
0 commit comments