1 | <?php |
||
19 | class SyslogTarget extends Target |
||
20 | { |
||
21 | /** |
||
22 | * @var string syslog identity |
||
23 | */ |
||
24 | public $identity; |
||
25 | /** |
||
26 | * @var int syslog facility. |
||
27 | */ |
||
28 | public $facility = LOG_USER; |
||
29 | /** |
||
30 | * @var int openlog options. This is a bitfield passed as the `$option` parameter to [openlog()](http://php.net/openlog). |
||
31 | * Defaults to `null` which means to use the default options `LOG_ODELAY | LOG_PID`. |
||
32 | * @see http://php.net/openlog for available options. |
||
33 | * @since 2.0.11 |
||
34 | */ |
||
35 | public $options; |
||
36 | |||
37 | /** |
||
38 | * @var array syslog levels |
||
39 | */ |
||
40 | private $_syslogLevels = [ |
||
41 | Logger::LEVEL_TRACE => LOG_DEBUG, |
||
42 | Logger::LEVEL_PROFILE_BEGIN => LOG_DEBUG, |
||
43 | Logger::LEVEL_PROFILE_END => LOG_DEBUG, |
||
44 | Logger::LEVEL_PROFILE => LOG_DEBUG, |
||
45 | Logger::LEVEL_INFO => LOG_INFO, |
||
46 | Logger::LEVEL_WARNING => LOG_WARNING, |
||
47 | Logger::LEVEL_ERROR => LOG_ERR, |
||
48 | ]; |
||
49 | |||
50 | /** |
||
51 | * @inheritdoc |
||
52 | */ |
||
53 | public function init() |
||
60 | |||
61 | /** |
||
62 | * Writes log messages to syslog |
||
63 | */ |
||
64 | 1 | public function export() |
|
72 | |||
73 | /** |
||
74 | * @inheritdoc |
||
75 | */ |
||
76 | 3 | public function formatMessage($message) |
|
92 | } |
||
93 |
This checks looks for assignemnts to variables using the
list(...)
function, where not all assigned variables are subsequently used.Consider the following code example.
Only the variables
$a
and$c
are used. There was no need to assign$b
.Instead, the list call could have been.