ToEventlog::finalizeMessage()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
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