It is generally recommended to explicitly declare the visibility for methods.
Adding explicit visibility (private, protected, or public) is generally
recommend to communicate to other developers how, and from where this method
is intended to be used.
Loading history...
24
{
25
2
$this->modifier = $modifier;
26
2
}
27
28
/**
29
* @return callable
30
*/
31
1
public function getModifier()
32
{
33
1
return $this->modifier;
34
}
35
36
/**
37
* Apply the modifier to the Swift_Message
38
*
39
* @param Swift_Events_SendEvent $evt
40
*/
41
1
public function beforeSendPerformed(Swift_Events_SendEvent $evt)
42
{
43
1
$message = $evt->getMessage();
44
45
1
call_user_func($this->modifier, $message);
46
1
}
47
48
/**
49
* Do nothing
50
*
51
* @param Swift_Events_SendEvent $evt
52
*/
53
1
public function sendPerformed(Swift_Events_SendEvent $evt)
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.