ToEventlog   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 1
b 0
f 0
dl 0
loc 24
ccs 0
cts 3
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A finalizeMessage() 0 3 1
1
<?php
2
/**
3
 * Log to Windows Event Log.
4
 *
5
 * @author    Vitex <[email protected]>
6
 * @copyright 2009-2016 [email protected] (G)
7
 */
8
9
namespace Ease\Logger;
10
11
/**
12
 * Log to EventLog.
13
 *
14
 * @author    Vitex <[email protected]>
15
 * @copyright 2009-2019 [email protected] (G)
16
 */
17
class ToEventlog extends ToSyslog implements Loggingable
18
{
19
    /**
20
     * Předvolená metoda logování.
21
     *
22
     * @var string
23
     */
24
    public $logType = 'eventlog';
25
26
    /**
27
     * @var ToEventlog Saves obejct instace (singleton...).
28
     */
29
    private static $instance = null;
0 ignored issues
show
introduced by
The private property $instance is not used, and could be removed.
Loading history...
30
31
    /**
32
     * Encode For Windows event Log
33
     *
34
     * @param string $messageRaw
35
     *
36
     * @return string ready to use message
37
     */
38
    public function finalizeMessage($messageRaw)
39
    {
40
        return iconv("UTF-8", "cp1251//TRANSLIT", $messageRaw);
41
    }
42
    
43
}
44