Completed
Push — master ( 1290c6...6da602 )
by Florian
04:36
created
lib/Payone/Log4php/LoggerLayoutHtml.php 2 patches
Indentation   +143 added lines, -143 removed lines patch added patch discarded remove patch
@@ -47,168 +47,168 @@
 block discarded – undo
47 47
  * @subpackage layouts
48 48
  */
49 49
 class Payone_Log4php_LoggerLayoutHtml extends Payone_Log4php_LoggerLayout {
50
-	/**
51
-	 * The <b>LocationInfo</b> option takes a boolean value. By
52
-	 * default, it is set to false which means there will be no location
53
-	 * information output by this layout. If the the option is set to
54
-	 * true, then the file name and line number of the statement
55
-	 * at the origin of the log statement will be output.
56
-	 *
57
-	 * <p>If you are embedding this layout within a {@link Payone_Log4php_LoggerAppenderMail}
58
-	 * or a {@link Payone_Log4php_LoggerAppenderMailEvent} then make sure to set the
59
-	 * <b>LocationInfo</b> option of that appender as well.
60
-	 * @var boolean
61
-	 */
62
-	protected $locationInfo = false;
50
+    /**
51
+     * The <b>LocationInfo</b> option takes a boolean value. By
52
+     * default, it is set to false which means there will be no location
53
+     * information output by this layout. If the the option is set to
54
+     * true, then the file name and line number of the statement
55
+     * at the origin of the log statement will be output.
56
+     *
57
+     * <p>If you are embedding this layout within a {@link Payone_Log4php_LoggerAppenderMail}
58
+     * or a {@link Payone_Log4php_LoggerAppenderMailEvent} then make sure to set the
59
+     * <b>LocationInfo</b> option of that appender as well.
60
+     * @var boolean
61
+     */
62
+    protected $locationInfo = false;
63 63
 	
64
-	/**
65
-	 * The <b>Title</b> option takes a String value. This option sets the
66
-	 * document title of the generated HTML document.
67
-	 * Defaults to 'Log4php Log Messages'.
68
-	 * @var string
69
-	 */
70
-	protected $title = "Log4php Log Messages";
64
+    /**
65
+     * The <b>Title</b> option takes a String value. This option sets the
66
+     * document title of the generated HTML document.
67
+     * Defaults to 'Log4php Log Messages'.
68
+     * @var string
69
+     */
70
+    protected $title = "Log4php Log Messages";
71 71
 	
72
-	/**
73
-	 * The <b>LocationInfo</b> option takes a boolean value. By
74
-	 * default, it is set to false which means there will be no location
75
-	 * information output by this layout. If the the option is set to
76
-	 * true, then the file name and line number of the statement
77
-	 * at the origin of the log statement will be output.
78
-	 *
79
-	 * <p>If you are embedding this layout within a {@link Payone_Log4php_LoggerAppenderMail}
80
-	 * or a {@link Payone_Log4php_LoggerAppenderMailEvent} then make sure to set the
81
-	 * <b>LocationInfo</b> option of that appender as well.
82
-	 */
83
-	public function setLocationInfo($flag) {
84
-		$this->setBoolean('locationInfo', $flag);
85
-	}
72
+    /**
73
+     * The <b>LocationInfo</b> option takes a boolean value. By
74
+     * default, it is set to false which means there will be no location
75
+     * information output by this layout. If the the option is set to
76
+     * true, then the file name and line number of the statement
77
+     * at the origin of the log statement will be output.
78
+     *
79
+     * <p>If you are embedding this layout within a {@link Payone_Log4php_LoggerAppenderMail}
80
+     * or a {@link Payone_Log4php_LoggerAppenderMailEvent} then make sure to set the
81
+     * <b>LocationInfo</b> option of that appender as well.
82
+     */
83
+    public function setLocationInfo($flag) {
84
+        $this->setBoolean('locationInfo', $flag);
85
+    }
86 86
 
87
-	/**
88
-	 * Returns the current value of the <b>LocationInfo</b> option.
89
-	 */
90
-	public function getLocationInfo() {
91
-		return $this->locationInfo;
92
-	}
87
+    /**
88
+     * Returns the current value of the <b>LocationInfo</b> option.
89
+     */
90
+    public function getLocationInfo() {
91
+        return $this->locationInfo;
92
+    }
93 93
 	
94
-	/**
95
-	 * The <b>Title</b> option takes a String value. This option sets the
96
-	 * document title of the generated HTML document.
97
-	 * Defaults to 'Log4php Log Messages'.
98
-	 */
99
-	public function setTitle($title) {
100
-		$this->setString('title', $title);
101
-	}
94
+    /**
95
+     * The <b>Title</b> option takes a String value. This option sets the
96
+     * document title of the generated HTML document.
97
+     * Defaults to 'Log4php Log Messages'.
98
+     */
99
+    public function setTitle($title) {
100
+        $this->setString('title', $title);
101
+    }
102 102
 
103
-	/**
104
-	 * @return string Returns the current value of the <b>Title</b> option.
105
-	 */
106
-	public function getTitle() {
107
-		return $this->title;
108
-	}
103
+    /**
104
+     * @return string Returns the current value of the <b>Title</b> option.
105
+     */
106
+    public function getTitle() {
107
+        return $this->title;
108
+    }
109 109
 	
110
-	/**
111
-	 * @return string Returns the content type output by this layout, i.e "text/html".
112
-	 */
113
-	public function getContentType() {
114
-		return "text/html";
115
-	}
110
+    /**
111
+     * @return string Returns the content type output by this layout, i.e "text/html".
112
+     */
113
+    public function getContentType() {
114
+        return "text/html";
115
+    }
116 116
 	
117
-	/**
118
-	 * @param Payone_Log4php_LoggerLoggingEvent $event
119
-	 * @return string
120
-	 */
121
-	public function format(Payone_Log4php_LoggerLoggingEvent $event) {
122
-		$sbuf = PHP_EOL . "<tr>" . PHP_EOL;
117
+    /**
118
+     * @param Payone_Log4php_LoggerLoggingEvent $event
119
+     * @return string
120
+     */
121
+    public function format(Payone_Log4php_LoggerLoggingEvent $event) {
122
+        $sbuf = PHP_EOL . "<tr>" . PHP_EOL;
123 123
 	
124
-		$sbuf .= "<td>";
125
-		$sbuf .= $event->getTime();
126
-		$sbuf .= "</td>" . PHP_EOL;
124
+        $sbuf .= "<td>";
125
+        $sbuf .= $event->getTime();
126
+        $sbuf .= "</td>" . PHP_EOL;
127 127
 	
128
-		$sbuf .= "<td title=\"" . $event->getThreadName() . " thread\">";
129
-		$sbuf .= $event->getThreadName();
130
-		$sbuf .= "</td>" . PHP_EOL;
128
+        $sbuf .= "<td title=\"" . $event->getThreadName() . " thread\">";
129
+        $sbuf .= $event->getThreadName();
130
+        $sbuf .= "</td>" . PHP_EOL;
131 131
 	
132
-		$sbuf .= "<td title=\"Level\">";
132
+        $sbuf .= "<td title=\"Level\">";
133 133
 		
134
-		$level = $event->getLevel();
134
+        $level = $event->getLevel();
135 135
 		
136
-		if ($level->equals(Payone_Log4php_LoggerLevel::getLevelDebug())) {
137
-			$sbuf .= "<font color=\"#339933\">$level</font>";
138
-		} else if ($level->equals(Payone_Log4php_LoggerLevel::getLevelWarn())) {
139
-			$sbuf .= "<font color=\"#993300\"><strong>$level</strong></font>";
140
-		} else {
141
-			$sbuf .= $level;
142
-		}
143
-		$sbuf .= "</td>" . PHP_EOL;
136
+        if ($level->equals(Payone_Log4php_LoggerLevel::getLevelDebug())) {
137
+            $sbuf .= "<font color=\"#339933\">$level</font>";
138
+        } else if ($level->equals(Payone_Log4php_LoggerLevel::getLevelWarn())) {
139
+            $sbuf .= "<font color=\"#993300\"><strong>$level</strong></font>";
140
+        } else {
141
+            $sbuf .= $level;
142
+        }
143
+        $sbuf .= "</td>" . PHP_EOL;
144 144
 	
145
-		$sbuf .= "<td title=\"" . htmlentities($event->getLoggerName(), ENT_QUOTES) . " category\">";
146
-		$sbuf .= htmlentities($event->getLoggerName(), ENT_QUOTES);
147
-		$sbuf .= "</td>" . PHP_EOL;
145
+        $sbuf .= "<td title=\"" . htmlentities($event->getLoggerName(), ENT_QUOTES) . " category\">";
146
+        $sbuf .= htmlentities($event->getLoggerName(), ENT_QUOTES);
147
+        $sbuf .= "</td>" . PHP_EOL;
148 148
 	
149
-		if ($this->locationInfo) {
150
-			$locInfo = $event->getLocationInformation();
151
-			$sbuf .= "<td>";
152
-			$sbuf .= htmlentities($locInfo->getFileName(), ENT_QUOTES). ':' . $locInfo->getLineNumber();
153
-			$sbuf .= "</td>" . PHP_EOL;
154
-		}
149
+        if ($this->locationInfo) {
150
+            $locInfo = $event->getLocationInformation();
151
+            $sbuf .= "<td>";
152
+            $sbuf .= htmlentities($locInfo->getFileName(), ENT_QUOTES). ':' . $locInfo->getLineNumber();
153
+            $sbuf .= "</td>" . PHP_EOL;
154
+        }
155 155
 
156
-		$sbuf .= "<td title=\"Message\">";
157
-		$sbuf .= htmlentities($event->getRenderedMessage(), ENT_QUOTES);
158
-		$sbuf .= "</td>" . PHP_EOL;
156
+        $sbuf .= "<td title=\"Message\">";
157
+        $sbuf .= htmlentities($event->getRenderedMessage(), ENT_QUOTES);
158
+        $sbuf .= "</td>" . PHP_EOL;
159 159
 
160
-		$sbuf .= "</tr>" . PHP_EOL;
160
+        $sbuf .= "</tr>" . PHP_EOL;
161 161
 		
162
-		if ($event->getNDC() != null) {
163
-			$sbuf .= "<tr><td bgcolor=\"#EEEEEE\" style=\"font-size : xx-small;\" colspan=\"6\" title=\"Nested Diagnostic Context\">";
164
-			$sbuf .= "NDC: " . htmlentities($event->getNDC(), ENT_QUOTES);
165
-			$sbuf .= "</td></tr>" . PHP_EOL;
166
-		}
167
-		return $sbuf;
168
-	}
162
+        if ($event->getNDC() != null) {
163
+            $sbuf .= "<tr><td bgcolor=\"#EEEEEE\" style=\"font-size : xx-small;\" colspan=\"6\" title=\"Nested Diagnostic Context\">";
164
+            $sbuf .= "NDC: " . htmlentities($event->getNDC(), ENT_QUOTES);
165
+            $sbuf .= "</td></tr>" . PHP_EOL;
166
+        }
167
+        return $sbuf;
168
+    }
169 169
 
170
-	/**
171
-	 * @return string Returns appropriate HTML headers.
172
-	 */
173
-	public function getHeader() {
174
-		$sbuf = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">" . PHP_EOL;
175
-		$sbuf .= "<html>" . PHP_EOL;
176
-		$sbuf .= "<head>" . PHP_EOL;
177
-		$sbuf .= "<title>" . $this->title . "</title>" . PHP_EOL;
178
-		$sbuf .= "<style type=\"text/css\">" . PHP_EOL;
179
-		$sbuf .= "<!--" . PHP_EOL;
180
-		$sbuf .= "body, table {font-family: arial,sans-serif; font-size: x-small;}" . PHP_EOL;
181
-		$sbuf .= "th {background: #336699; color: #FFFFFF; text-align: left;}" . PHP_EOL;
182
-		$sbuf .= "-->" . PHP_EOL;
183
-		$sbuf .= "</style>" . PHP_EOL;
184
-		$sbuf .= "</head>" . PHP_EOL;
185
-		$sbuf .= "<body bgcolor=\"#FFFFFF\" topmargin=\"6\" leftmargin=\"6\">" . PHP_EOL;
186
-		$sbuf .= "<hr size=\"1\" noshade>" . PHP_EOL;
187
-		$sbuf .= "Log session start time " . strftime('%c', time()) . "<br>" . PHP_EOL;
188
-		$sbuf .= "<br>" . PHP_EOL;
189
-		$sbuf .= "<table cellspacing=\"0\" cellpadding=\"4\" border=\"1\" bordercolor=\"#224466\" width=\"100%\">" . PHP_EOL;
190
-		$sbuf .= "<tr>" . PHP_EOL;
191
-		$sbuf .= "<th>Time</th>" . PHP_EOL;
192
-		$sbuf .= "<th>Thread</th>" . PHP_EOL;
193
-		$sbuf .= "<th>Level</th>" . PHP_EOL;
194
-		$sbuf .= "<th>Category</th>" . PHP_EOL;
195
-		if ($this->locationInfo) {
196
-			$sbuf .= "<th>File:Line</th>" . PHP_EOL;
197
-		}
198
-		$sbuf .= "<th>Message</th>" . PHP_EOL;
199
-		$sbuf .= "</tr>" . PHP_EOL;
170
+    /**
171
+     * @return string Returns appropriate HTML headers.
172
+     */
173
+    public function getHeader() {
174
+        $sbuf = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">" . PHP_EOL;
175
+        $sbuf .= "<html>" . PHP_EOL;
176
+        $sbuf .= "<head>" . PHP_EOL;
177
+        $sbuf .= "<title>" . $this->title . "</title>" . PHP_EOL;
178
+        $sbuf .= "<style type=\"text/css\">" . PHP_EOL;
179
+        $sbuf .= "<!--" . PHP_EOL;
180
+        $sbuf .= "body, table {font-family: arial,sans-serif; font-size: x-small;}" . PHP_EOL;
181
+        $sbuf .= "th {background: #336699; color: #FFFFFF; text-align: left;}" . PHP_EOL;
182
+        $sbuf .= "-->" . PHP_EOL;
183
+        $sbuf .= "</style>" . PHP_EOL;
184
+        $sbuf .= "</head>" . PHP_EOL;
185
+        $sbuf .= "<body bgcolor=\"#FFFFFF\" topmargin=\"6\" leftmargin=\"6\">" . PHP_EOL;
186
+        $sbuf .= "<hr size=\"1\" noshade>" . PHP_EOL;
187
+        $sbuf .= "Log session start time " . strftime('%c', time()) . "<br>" . PHP_EOL;
188
+        $sbuf .= "<br>" . PHP_EOL;
189
+        $sbuf .= "<table cellspacing=\"0\" cellpadding=\"4\" border=\"1\" bordercolor=\"#224466\" width=\"100%\">" . PHP_EOL;
190
+        $sbuf .= "<tr>" . PHP_EOL;
191
+        $sbuf .= "<th>Time</th>" . PHP_EOL;
192
+        $sbuf .= "<th>Thread</th>" . PHP_EOL;
193
+        $sbuf .= "<th>Level</th>" . PHP_EOL;
194
+        $sbuf .= "<th>Category</th>" . PHP_EOL;
195
+        if ($this->locationInfo) {
196
+            $sbuf .= "<th>File:Line</th>" . PHP_EOL;
197
+        }
198
+        $sbuf .= "<th>Message</th>" . PHP_EOL;
199
+        $sbuf .= "</tr>" . PHP_EOL;
200 200
 
201
-		return $sbuf;
202
-	}
201
+        return $sbuf;
202
+    }
203 203
 
204
-	/**
205
-	 * @return string Returns the appropriate HTML footers.
206
-	 */
207
-	public function getFooter() {
208
-		$sbuf = "</table>" . PHP_EOL;
209
-		$sbuf .= "<br>" . PHP_EOL;
210
-		$sbuf .= "</body></html>";
204
+    /**
205
+     * @return string Returns the appropriate HTML footers.
206
+     */
207
+    public function getFooter() {
208
+        $sbuf = "</table>" . PHP_EOL;
209
+        $sbuf .= "<br>" . PHP_EOL;
210
+        $sbuf .= "</body></html>";
211 211
 
212
-		return $sbuf;
213
-	}
212
+        return $sbuf;
213
+    }
214 214
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
 		if ($this->locationInfo) {
150 150
 			$locInfo = $event->getLocationInformation();
151 151
 			$sbuf .= "<td>";
152
-			$sbuf .= htmlentities($locInfo->getFileName(), ENT_QUOTES). ':' . $locInfo->getLineNumber();
152
+			$sbuf .= htmlentities($locInfo->getFileName(), ENT_QUOTES) . ':' . $locInfo->getLineNumber();
153 153
 			$sbuf .= "</td>" . PHP_EOL;
154 154
 		}
155 155
 
Please login to merge, or discard this patch.
lib/Payone/Log4php/LoggerPatternConverterNewLine.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
  */
27 27
 class Payone_Log4php_LoggerPatternConverterNewLine extends Payone_Log4php_LoggerPatternConverter {
28 28
 
29
-	public function convert(Payone_Log4php_LoggerLoggingEvent $event) {
30
-		return PHP_EOL;
31
-	}
29
+    public function convert(Payone_Log4php_LoggerLoggingEvent $event) {
30
+        return PHP_EOL;
31
+    }
32 32
 }
Please login to merge, or discard this patch.
lib/Payone/Log4php/LoggerPatternConverterClass.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@
 block discarded – undo
27 27
  */
28 28
 class Payone_Log4php_LoggerPatternConverterClass extends Payone_Log4php_LoggerPatternConverter {
29 29
 
30
-	public function convert(Payone_Log4php_LoggerLoggingEvent $event) {
31
-		return $event->getLocationInformation()->getClassName();
32
-	}
30
+    public function convert(Payone_Log4php_LoggerLoggingEvent $event) {
31
+        return $event->getLocationInformation()->getClassName();
32
+    }
33 33
 }
34
- 
35 34
\ No newline at end of file
35
+    
36 36
\ No newline at end of file
Please login to merge, or discard this patch.
lib/Payone/Log4php/LoggerLayout.php 1 patch
Indentation   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -25,50 +25,50 @@
 block discarded – undo
25 25
  * @package log4php
26 26
  */
27 27
 abstract class Payone_Log4php_LoggerLayout extends Payone_Log4php_LoggerConfigurable {
28
-	/**
29
-	 * Activates options for this layout.
30
-	 * Override this method if you have options to be activated.
31
-	 */
32
-	public function activateOptions() {
33
-		return true;
34
-	}
28
+    /**
29
+     * Activates options for this layout.
30
+     * Override this method if you have options to be activated.
31
+     */
32
+    public function activateOptions() {
33
+        return true;
34
+    }
35 35
 
36
-	/**
37
-	 * Override this method to create your own layout format.
38
-	 *
39
-	 * @param LoggerLoggingEvent
40
-	 * @return string
41
-	 */
42
-	public function format(Payone_Log4php_LoggerLoggingEvent $event) {
43
-		return $event->getRenderedMessage();
44
-	} 
36
+    /**
37
+     * Override this method to create your own layout format.
38
+     *
39
+     * @param LoggerLoggingEvent
40
+     * @return string
41
+     */
42
+    public function format(Payone_Log4php_LoggerLoggingEvent $event) {
43
+        return $event->getRenderedMessage();
44
+    } 
45 45
 	
46
-	/**
47
-	 * Returns the content type output by this layout.
48
-	 * @return string
49
-	 */
50
-	public function getContentType() {
51
-		return "text/plain";
52
-	} 
46
+    /**
47
+     * Returns the content type output by this layout.
48
+     * @return string
49
+     */
50
+    public function getContentType() {
51
+        return "text/plain";
52
+    } 
53 53
 			
54
-	/**
55
-	 * Returns the footer for the layout format.
56
-	 * @return string
57
-	 */
58
-	public function getFooter() {
59
-		return null;
60
-	} 
54
+    /**
55
+     * Returns the footer for the layout format.
56
+     * @return string
57
+     */
58
+    public function getFooter() {
59
+        return null;
60
+    } 
61 61
 
62
-	/**
63
-	 * Returns the header for the layout format.
64
-	 * @return string
65
-	 */
66
-	public function getHeader() {
67
-		return null;
68
-	}
62
+    /**
63
+     * Returns the header for the layout format.
64
+     * @return string
65
+     */
66
+    public function getHeader() {
67
+        return null;
68
+    }
69 69
 	
70
-	/** Triggers a warning for this layout with the given message. */
71
-	protected function warn($message) {
72
-		trigger_error("log4php: [" . get_class($this) . "]: $message", E_USER_WARNING);
73
-	}
70
+    /** Triggers a warning for this layout with the given message. */
71
+    protected function warn($message) {
72
+        trigger_error("log4php: [" . get_class($this) . "]: $message", E_USER_WARNING);
73
+    }
74 74
 }
Please login to merge, or discard this patch.
lib/Payone/Log4php/LoggerLayoutTTCC.php 2 patches
Indentation   +121 added lines, -121 removed lines patch added patch discarded remove patch
@@ -50,148 +50,148 @@
 block discarded – undo
50 50
  */
51 51
 class Payone_Log4php_LoggerLayoutTTCC extends Payone_Log4php_LoggerLayout {
52 52
 
53
-	// Internal representation of options
54
-	protected $threadPrinting    = true;
55
-	protected $categoryPrefixing = true;
56
-	protected $contextPrinting   = true;
57
-	protected $microSecondsPrinting = true;
53
+    // Internal representation of options
54
+    protected $threadPrinting    = true;
55
+    protected $categoryPrefixing = true;
56
+    protected $contextPrinting   = true;
57
+    protected $microSecondsPrinting = true;
58 58
 	
59
-	/**
60
-	 * @var string date format. See {@link PHP_MANUAL#strftime} for details
61
-	 */
62
-	protected $dateFormat = '%c';
59
+    /**
60
+     * @var string date format. See {@link PHP_MANUAL#strftime} for details
61
+     */
62
+    protected $dateFormat = '%c';
63 63
 
64
-	/**
65
-	 * Constructor
66
-	 *
67
-	 * @param string date format
68
-	 * @see dateFormat
69
-	 */
70
-	public function __construct($dateFormat = '') {
71
-		if (!empty($dateFormat)) {
72
-			$this->dateFormat = $dateFormat;
73
-		}
74
-		return;
75
-	}
64
+    /**
65
+     * Constructor
66
+     *
67
+     * @param string date format
68
+     * @see dateFormat
69
+     */
70
+    public function __construct($dateFormat = '') {
71
+        if (!empty($dateFormat)) {
72
+            $this->dateFormat = $dateFormat;
73
+        }
74
+        return;
75
+    }
76 76
 
77
-	/**
78
-	 * The <b>ThreadPrinting</b> option specifies whether the name of the
79
-	 * current thread is part of log output or not. This is true by default.
80
-	 */
81
-	public function setThreadPrinting($threadPrinting) {
82
-		$this->setBoolean('threadPrinting', $threadPrinting);
83
-	}
77
+    /**
78
+     * The <b>ThreadPrinting</b> option specifies whether the name of the
79
+     * current thread is part of log output or not. This is true by default.
80
+     */
81
+    public function setThreadPrinting($threadPrinting) {
82
+        $this->setBoolean('threadPrinting', $threadPrinting);
83
+    }
84 84
 
85
-	/**
86
-	 * @return boolean Returns value of the <b>ThreadPrinting</b> option.
87
-	 */
88
-	public function getThreadPrinting() {
89
-		return $this->threadPrinting;
90
-	}
85
+    /**
86
+     * @return boolean Returns value of the <b>ThreadPrinting</b> option.
87
+     */
88
+    public function getThreadPrinting() {
89
+        return $this->threadPrinting;
90
+    }
91 91
 
92
-	/**
93
-	 * The <b>CategoryPrefixing</b> option specifies whether {@link Category}
94
-	 * name is part of log output or not. This is true by default.
95
-	 */
96
-	public function setCategoryPrefixing($categoryPrefixing) {
97
-		$this->setBoolean('categoryPrefixing', $categoryPrefixing);
98
-	}
92
+    /**
93
+     * The <b>CategoryPrefixing</b> option specifies whether {@link Category}
94
+     * name is part of log output or not. This is true by default.
95
+     */
96
+    public function setCategoryPrefixing($categoryPrefixing) {
97
+        $this->setBoolean('categoryPrefixing', $categoryPrefixing);
98
+    }
99 99
 
100
-	/**
101
-	 * @return boolean Returns value of the <b>CategoryPrefixing</b> option.
102
-	 */
103
-	public function getCategoryPrefixing() {
104
-		return $this->categoryPrefixing;
105
-	}
100
+    /**
101
+     * @return boolean Returns value of the <b>CategoryPrefixing</b> option.
102
+     */
103
+    public function getCategoryPrefixing() {
104
+        return $this->categoryPrefixing;
105
+    }
106 106
 
107
-	/**
108
-	 * The <b>ContextPrinting</b> option specifies log output will include
109
-	 * the nested context information belonging to the current thread.
110
-	 * This is true by default.
111
-	 */
112
-	public function setContextPrinting($contextPrinting) {
113
-		$this->setBoolean('contextPrinting', $contextPrinting);
114
-	}
107
+    /**
108
+     * The <b>ContextPrinting</b> option specifies log output will include
109
+     * the nested context information belonging to the current thread.
110
+     * This is true by default.
111
+     */
112
+    public function setContextPrinting($contextPrinting) {
113
+        $this->setBoolean('contextPrinting', $contextPrinting);
114
+    }
115 115
 
116
-	/**
117
-	 * @return boolean Returns value of the <b>ContextPrinting</b> option.
118
-	 */
119
-	public function getContextPrinting() {
120
-		return $this->contextPrinting;
121
-	}
116
+    /**
117
+     * @return boolean Returns value of the <b>ContextPrinting</b> option.
118
+     */
119
+    public function getContextPrinting() {
120
+        return $this->contextPrinting;
121
+    }
122 122
 	
123
-	/**
124
-	 * The <b>MicroSecondsPrinting</b> option specifies if microseconds infos
125
-	 * should be printed at the end of timestamp.
126
-	 * This is true by default.
127
-	 */
128
-	public function setMicroSecondsPrinting($microSecondsPrinting) {
129
-		$this->setBoolean('microSecondsPrinting', $microSecondsPrinting);
130
-	}
123
+    /**
124
+     * The <b>MicroSecondsPrinting</b> option specifies if microseconds infos
125
+     * should be printed at the end of timestamp.
126
+     * This is true by default.
127
+     */
128
+    public function setMicroSecondsPrinting($microSecondsPrinting) {
129
+        $this->setBoolean('microSecondsPrinting', $microSecondsPrinting);
130
+    }
131 131
 
132
-	/**
133
-	 * @return boolean Returns value of the <b>MicroSecondsPrinting</b> option.
134
-	 */
135
-	public function getMicroSecondsPrinting() {
136
-		return $this->microSecondsPrinting;
137
-	}
132
+    /**
133
+     * @return boolean Returns value of the <b>MicroSecondsPrinting</b> option.
134
+     */
135
+    public function getMicroSecondsPrinting() {
136
+        return $this->microSecondsPrinting;
137
+    }
138 138
 	
139 139
 	
140
-	public function setDateFormat($dateFormat) {
141
-		$this->setString('dateFormat', $dateFormat);
142
-	}
140
+    public function setDateFormat($dateFormat) {
141
+        $this->setString('dateFormat', $dateFormat);
142
+    }
143 143
 	
144
-	/**
145
-	 * @return string
146
-	 */
147
-	public function getDateFormat() {
148
-		return $this->dateFormat;
149
-	}
144
+    /**
145
+     * @return string
146
+     */
147
+    public function getDateFormat() {
148
+        return $this->dateFormat;
149
+    }
150 150
 
151
-	/**
152
-	 * In addition to the level of the statement and message, the
153
-	 * returned string includes time, thread, category.
154
-	 * <p>Time, thread, category are printed depending on options.
155
-	 *
156
-	 * @param Payone_Log4php_LoggerLoggingEvent $event
157
-	 * @return string
158
-	 */
159
-	public function format(Payone_Log4php_LoggerLoggingEvent $event) {
160
-		$timeStamp = (float)$event->getTimeStamp();
161
-		$format = strftime($this->dateFormat, (int)$timeStamp);
151
+    /**
152
+     * In addition to the level of the statement and message, the
153
+     * returned string includes time, thread, category.
154
+     * <p>Time, thread, category are printed depending on options.
155
+     *
156
+     * @param Payone_Log4php_LoggerLoggingEvent $event
157
+     * @return string
158
+     */
159
+    public function format(Payone_Log4php_LoggerLoggingEvent $event) {
160
+        $timeStamp = (float)$event->getTimeStamp();
161
+        $format = strftime($this->dateFormat, (int)$timeStamp);
162 162
 		
163
-		if ($this->microSecondsPrinting) {
164
-			$usecs = floor(($timeStamp - (int)$timeStamp) * 1000);
165
-			$format .= sprintf(',%03d', $usecs);
166
-		}
163
+        if ($this->microSecondsPrinting) {
164
+            $usecs = floor(($timeStamp - (int)$timeStamp) * 1000);
165
+            $format .= sprintf(',%03d', $usecs);
166
+        }
167 167
 			
168
-		$format .= ' ';
168
+        $format .= ' ';
169 169
 		
170
-		if ($this->threadPrinting) {
171
-			$format .= '['.getmypid().'] ';
172
-		}
170
+        if ($this->threadPrinting) {
171
+            $format .= '['.getmypid().'] ';
172
+        }
173 173
 		
174
-		$level = $event->getLevel();
175
-		$format .= $level.' ';
174
+        $level = $event->getLevel();
175
+        $format .= $level.' ';
176 176
 		
177
-		if($this->categoryPrefixing) {
178
-			$format .= $event->getLoggerName().' ';
179
-		}
177
+        if($this->categoryPrefixing) {
178
+            $format .= $event->getLoggerName().' ';
179
+        }
180 180
 	   
181
-		if($this->contextPrinting) {
182
-			$ndc = $event->getNDC();
183
-			if($ndc != null) {
184
-				$format .= $ndc.' ';
185
-			}
186
-		}
181
+        if($this->contextPrinting) {
182
+            $ndc = $event->getNDC();
183
+            if($ndc != null) {
184
+                $format .= $ndc.' ';
185
+            }
186
+        }
187 187
 		
188
-		$format .= '- '.$event->getRenderedMessage();
189
-		$format .= PHP_EOL;
188
+        $format .= '- '.$event->getRenderedMessage();
189
+        $format .= PHP_EOL;
190 190
 		
191
-		return $format;
192
-	}
191
+        return $format;
192
+    }
193 193
 
194
-	public function ignoresThrowable() {
195
-		return true;
196
-	}
194
+    public function ignoresThrowable() {
195
+        return true;
196
+    }
197 197
 }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -168,24 +168,24 @@
 block discarded – undo
168 168
 		$format .= ' ';
169 169
 		
170 170
 		if ($this->threadPrinting) {
171
-			$format .= '['.getmypid().'] ';
171
+			$format .= '[' . getmypid() . '] ';
172 172
 		}
173 173
 		
174 174
 		$level = $event->getLevel();
175
-		$format .= $level.' ';
175
+		$format .= $level . ' ';
176 176
 		
177
-		if($this->categoryPrefixing) {
178
-			$format .= $event->getLoggerName().' ';
177
+		if ($this->categoryPrefixing) {
178
+			$format .= $event->getLoggerName() . ' ';
179 179
 		}
180 180
 	   
181
-		if($this->contextPrinting) {
181
+		if ($this->contextPrinting) {
182 182
 			$ndc = $event->getNDC();
183
-			if($ndc != null) {
184
-				$format .= $ndc.' ';
183
+			if ($ndc != null) {
184
+				$format .= $ndc . ' ';
185 185
 			}
186 186
 		}
187 187
 		
188
-		$format .= '- '.$event->getRenderedMessage();
188
+		$format .= '- ' . $event->getRenderedMessage();
189 189
 		$format .= PHP_EOL;
190 190
 		
191 191
 		return $format;
Please login to merge, or discard this patch.
lib/Payone/Log4php/LoggerAppenderMail.php 2 patches
Indentation   +45 added lines, -46 removed lines patch added patch discarded remove patch
@@ -47,67 +47,66 @@
 block discarded – undo
47 47
  *      Tue Sep  8 21:51:04 2009,120 [5485] FATAL root - Some critical message!
48 48
  *      Tue Sep  8 21:51:06 2009,120 [5485] FATAL root - Some more critical message!
49 49
  * </pre>
50
-
51 50
  * @version $Revision$
52 51
  * @package log4php
53 52
  * @subpackage appenders
54 53
  */
55 54
 class Payone_Log4php_LoggerAppenderMail extends Payone_Log4php_LoggerAppender {
56 55
 
57
-	/** @var string 'from' field */
58
-	protected $from = null;
56
+    /** @var string 'from' field */
57
+    protected $from = null;
59 58
 
60
-	/** @var string 'subject' field */
61
-	protected $subject = 'Log4php Report';
59
+    /** @var string 'subject' field */
60
+    protected $subject = 'Log4php Report';
62 61
 	
63
-	/** @var string 'to' field */
64
-	protected $to = null;
62
+    /** @var string 'to' field */
63
+    protected $to = null;
65 64
 
66
-	/** @var indiciates if this appender should run in dry mode */
67
-	protected $dry = false;
65
+    /** @var indiciates if this appender should run in dry mode */
66
+    protected $dry = false;
68 67
 
69
-	/** @var string used to create mail body */
70
-	protected $body = '';
68
+    /** @var string used to create mail body */
69
+    protected $body = '';
71 70
 	
72
-	public function close() {
73
-		if($this->closed != true) {
74
-			$from = $this->from;
75
-			$to = $this->to;
71
+    public function close() {
72
+        if($this->closed != true) {
73
+            $from = $this->from;
74
+            $to = $this->to;
76 75
 	
77
-			if(!empty($this->body) and $from !== null and $to !== null and $this->layout !== null) {
78
-				$subject = $this->subject;
79
-				if(!$this->dry) {
80
-					mail(
81
-						$to, $subject, 
82
-						$this->layout->getHeader() . $this->body . $this->layout->getFooter(),
83
-						"From: {$from}\r\n");
84
-				} else {
85
-				    echo "DRY MODE OF MAIL APP.: Send mail to: ".$to." with content: ".$this->body;
86
-				}
87
-			}
88
-			$this->closed = true;
89
-		}
90
-	}
76
+            if(!empty($this->body) and $from !== null and $to !== null and $this->layout !== null) {
77
+                $subject = $this->subject;
78
+                if(!$this->dry) {
79
+                    mail(
80
+                        $to, $subject, 
81
+                        $this->layout->getHeader() . $this->body . $this->layout->getFooter(),
82
+                        "From: {$from}\r\n");
83
+                } else {
84
+                    echo "DRY MODE OF MAIL APP.: Send mail to: ".$to." with content: ".$this->body;
85
+                }
86
+            }
87
+            $this->closed = true;
88
+        }
89
+    }
91 90
 	
92
-	public function setSubject($subject) {
93
-		$this->setString('subject', $subject);
94
-	}
91
+    public function setSubject($subject) {
92
+        $this->setString('subject', $subject);
93
+    }
95 94
 	
96
-	public function setTo($to) {
97
-		$this->setString('to', $to);
98
-	}
95
+    public function setTo($to) {
96
+        $this->setString('to', $to);
97
+    }
99 98
 
100
-	public function setFrom($from) {
101
-		$this->setString('from', $from);
102
-	}
99
+    public function setFrom($from) {
100
+        $this->setString('from', $from);
101
+    }
103 102
 
104
-	public function setDry($dry) {
105
-		$this->setBoolean('dry', $dry);
106
-	}
103
+    public function setDry($dry) {
104
+        $this->setBoolean('dry', $dry);
105
+    }
107 106
 	
108
-	public function append(Payone_Log4php_LoggerLoggingEvent $event) {
109
-		if($this->layout !== null) {
110
-			$this->body .= $this->layout->format($event);
111
-		}
112
-	}
107
+    public function append(Payone_Log4php_LoggerLoggingEvent $event) {
108
+        if($this->layout !== null) {
109
+            $this->body .= $this->layout->format($event);
110
+        }
111
+    }
113 112
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -70,19 +70,19 @@  discard block
 block discarded – undo
70 70
 	protected $body = '';
71 71
 	
72 72
 	public function close() {
73
-		if($this->closed != true) {
73
+		if ($this->closed != true) {
74 74
 			$from = $this->from;
75 75
 			$to = $this->to;
76 76
 	
77
-			if(!empty($this->body) and $from !== null and $to !== null and $this->layout !== null) {
77
+			if (!empty($this->body) and $from !== null and $to !== null and $this->layout !== null) {
78 78
 				$subject = $this->subject;
79
-				if(!$this->dry) {
79
+				if (!$this->dry) {
80 80
 					mail(
81 81
 						$to, $subject, 
82 82
 						$this->layout->getHeader() . $this->body . $this->layout->getFooter(),
83 83
 						"From: {$from}\r\n");
84 84
 				} else {
85
-				    echo "DRY MODE OF MAIL APP.: Send mail to: ".$to." with content: ".$this->body;
85
+				    echo "DRY MODE OF MAIL APP.: Send mail to: " . $to . " with content: " . $this->body;
86 86
 				}
87 87
 			}
88 88
 			$this->closed = true;
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	}
107 107
 	
108 108
 	public function append(Payone_Log4php_LoggerLoggingEvent $event) {
109
-		if($this->layout !== null) {
109
+		if ($this->layout !== null) {
110 110
 			$this->body .= $this->layout->format($event);
111 111
 		}
112 112
 	}
Please login to merge, or discard this patch.
lib/Payone/Log4php/LoggerAppenderSocket.php 1 patch
Indentation   +82 added lines, -82 removed lines patch added patch discarded remove patch
@@ -36,87 +36,87 @@
 block discarded – undo
36 36
  */ 
37 37
 class Payone_Log4php_LoggerAppenderSocket extends Payone_Log4php_LoggerAppender {
38 38
 	
39
-	/** 
40
-	 * Target host.
41
-	 * @see http://php.net/manual/en/function.fsockopen.php 
42
-	 */
43
-	protected $remoteHost;
44
-	
45
-	/** Target port */
46
-	protected $port = 4446;
47
-	
48
-	/** Connection timeout in ms. */
49
-	protected $timeout;
50
-	
51
-	// ******************************************
52
-	// *** Appender methods                   ***
53
-	// ******************************************
54
-	
55
-	/** Override the default layout to use serialized. */
56
-	public function getDefaultLayout() {
57
-		return new Payone_Log4php_LoggerLayoutSerialized();
58
-	}
59
-	
60
-	public function activateOptions() {
61
-		if (empty($this->remoteHost)) {
62
-			$this->warn("Required parameter [remoteHost] not set. Closing appender.");
63
-			$this->closed = true;
64
-			return;
65
-		}
66
-	
67
-		if (empty($this->timeout)) {
68
-			$this->timeout = ini_get("default_socket_timeout");
69
-		}
70
-	
71
-		$this->closed = false;
72
-	}
73
-	
74
-	public function append(Payone_Log4php_LoggerLoggingEvent $event) {
75
-		$socket = fsockopen($this->remoteHost, $this->port, $errno, $errstr, $this->timeout);
76
-		if ($socket === false) {
77
-			$this->warn("Could not open socket to {$this->remoteHost}:{$this->port}. Closing appender.");
78
-			$this->closed = true;
79
-			return;
80
-		}
81
-	
82
-		if (false === fwrite($socket, $this->layout->format($event))) {
83
-			$this->warn("Error writing to socket. Closing appender.");
84
-			$this->closed = true;
85
-		}
86
-		fclose($socket);
87
-	}
88
-	
89
-	// ******************************************
90
-	// *** Accessor methods                   ***
91
-	// ******************************************
92
-	
93
-	/** Sets the target host. */
94
-	public function setRemoteHost($hostname) {
95
-		$this->setString('remoteHost', $hostname);
96
-	}
97
-	
98
-	/** Sets the target port */
99
-	public function setPort($port) {
100
-		$this->setPositiveInteger('port', $port);
101
-	}
39
+    /** 
40
+     * Target host.
41
+     * @see http://php.net/manual/en/function.fsockopen.php 
42
+     */
43
+    protected $remoteHost;
44
+	
45
+    /** Target port */
46
+    protected $port = 4446;
47
+	
48
+    /** Connection timeout in ms. */
49
+    protected $timeout;
50
+	
51
+    // ******************************************
52
+    // *** Appender methods                   ***
53
+    // ******************************************
54
+	
55
+    /** Override the default layout to use serialized. */
56
+    public function getDefaultLayout() {
57
+        return new Payone_Log4php_LoggerLayoutSerialized();
58
+    }
59
+	
60
+    public function activateOptions() {
61
+        if (empty($this->remoteHost)) {
62
+            $this->warn("Required parameter [remoteHost] not set. Closing appender.");
63
+            $this->closed = true;
64
+            return;
65
+        }
66
+	
67
+        if (empty($this->timeout)) {
68
+            $this->timeout = ini_get("default_socket_timeout");
69
+        }
70
+	
71
+        $this->closed = false;
72
+    }
73
+	
74
+    public function append(Payone_Log4php_LoggerLoggingEvent $event) {
75
+        $socket = fsockopen($this->remoteHost, $this->port, $errno, $errstr, $this->timeout);
76
+        if ($socket === false) {
77
+            $this->warn("Could not open socket to {$this->remoteHost}:{$this->port}. Closing appender.");
78
+            $this->closed = true;
79
+            return;
80
+        }
81
+	
82
+        if (false === fwrite($socket, $this->layout->format($event))) {
83
+            $this->warn("Error writing to socket. Closing appender.");
84
+            $this->closed = true;
85
+        }
86
+        fclose($socket);
87
+    }
88
+	
89
+    // ******************************************
90
+    // *** Accessor methods                   ***
91
+    // ******************************************
92
+	
93
+    /** Sets the target host. */
94
+    public function setRemoteHost($hostname) {
95
+        $this->setString('remoteHost', $hostname);
96
+    }
97
+	
98
+    /** Sets the target port */
99
+    public function setPort($port) {
100
+        $this->setPositiveInteger('port', $port);
101
+    }
102 102
 	 
103
-	/** Sets the timeout. */
104
-	public function setTimeout($timeout) {
105
-		$this->setPositiveInteger('timeout', $timeout);
106
-	}
107
-	
108
-	/** Returns the target host. */
109
-	public function getRemoteHost() {
110
-		return $this->getRemoteHost();
111
-	}
112
-	
113
-	/** Returns the target port. */
114
-	public function getPort() {
115
-		return $this->port;
116
-	}
117
-	
118
-	/** Returns the timeout */
119
-	public function getTimeout() {
120
-		return $this->timeout;
121
-	}
103
+    /** Sets the timeout. */
104
+    public function setTimeout($timeout) {
105
+        $this->setPositiveInteger('timeout', $timeout);
106
+    }
107
+	
108
+    /** Returns the target host. */
109
+    public function getRemoteHost() {
110
+        return $this->getRemoteHost();
111
+    }
112
+	
113
+    /** Returns the target port. */
114
+    public function getPort() {
115
+        return $this->port;
116
+    }
117
+	
118
+    /** Returns the timeout */
119
+    public function getTimeout() {
120
+        return $this->timeout;
121
+    }
122 122
 }
Please login to merge, or discard this patch.
lib/Payone/Log4php/LoggerAppenderDailyFile.php 2 patches
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -52,59 +52,59 @@
 block discarded – undo
52 52
  */
53 53
 class Payone_Log4php_LoggerAppenderDailyFile extends Payone_Log4php_LoggerAppenderFile {
54 54
 
55
-	/**
56
-	 * Format date. 
57
-	 * It follows the {@link PHP_MANUAL#date()} formatting rules and <b>should always be set before {@link $file} param</b>.
58
-	 * @var string
59
-	 */
60
-	protected $datePattern = "Ymd";
55
+    /**
56
+     * Format date. 
57
+     * It follows the {@link PHP_MANUAL#date()} formatting rules and <b>should always be set before {@link $file} param</b>.
58
+     * @var string
59
+     */
60
+    protected $datePattern = "Ymd";
61 61
 	
62
-	/**
63
-	 * Sets date format for the file name.
64
-	 * @param string $datePattern a regular date() string format
65
-	 */
66
-	public function setDatePattern($datePattern) {
67
-		$this->setString('datePattern', $datePattern);
68
-	}
62
+    /**
63
+     * Sets date format for the file name.
64
+     * @param string $datePattern a regular date() string format
65
+     */
66
+    public function setDatePattern($datePattern) {
67
+        $this->setString('datePattern', $datePattern);
68
+    }
69 69
 	
70
-	/**
71
-	 * @return string returns date format for the filename
72
-	 */
73
-	public function getDatePattern() {
74
-		return $this->datePattern;
75
-	}
70
+    /**
71
+     * @return string returns date format for the filename
72
+     */
73
+    public function getDatePattern() {
74
+        return $this->datePattern;
75
+    }
76 76
 	
77
-	/** 
78
-	 * Similar to parent method, but but replaces "%s" in the file name with 
79
-	 * the current date in format specified by the 'datePattern' parameter.
80
-	 */ 
81
-	public function activateOptions() {
82
-		$fileName = $this->getFile();
83
-		$date = date($this->getDatePattern());
84
-		$fileName = sprintf($fileName, $date);
77
+    /** 
78
+     * Similar to parent method, but but replaces "%s" in the file name with 
79
+     * the current date in format specified by the 'datePattern' parameter.
80
+     */ 
81
+    public function activateOptions() {
82
+        $fileName = $this->getFile();
83
+        $date = date($this->getDatePattern());
84
+        $fileName = sprintf($fileName, $date);
85 85
 		
86
-		if(!is_file($fileName)) {
87
-			$dir = dirname($fileName);
88
-			if(!is_dir($dir)) {
89
-				mkdir($dir, 0777, true);
90
-			}
91
-		}
86
+        if(!is_file($fileName)) {
87
+            $dir = dirname($fileName);
88
+            if(!is_dir($dir)) {
89
+                mkdir($dir, 0777, true);
90
+            }
91
+        }
92 92
 	
93
-		$this->fp = fopen($fileName, ($this->getAppend()? 'a':'w'));
94
-		if($this->fp) {
95
-			if(flock($this->fp, LOCK_EX)) {
96
-				if($this->getAppend()) {
97
-					fseek($this->fp, 0, SEEK_END);
98
-				}
99
-				fwrite($this->fp, $this->layout->getHeader());
100
-				flock($this->fp, LOCK_UN);
101
-				$this->closed = false;
102
-			} else {
103
-				// TODO: should we take some action in this case?
104
-				$this->closed = true;
105
-			}
106
-		} else {
107
-			$this->closed = true;
108
-		}
109
-	}
93
+        $this->fp = fopen($fileName, ($this->getAppend()? 'a':'w'));
94
+        if($this->fp) {
95
+            if(flock($this->fp, LOCK_EX)) {
96
+                if($this->getAppend()) {
97
+                    fseek($this->fp, 0, SEEK_END);
98
+                }
99
+                fwrite($this->fp, $this->layout->getHeader());
100
+                flock($this->fp, LOCK_UN);
101
+                $this->closed = false;
102
+            } else {
103
+                // TODO: should we take some action in this case?
104
+                $this->closed = true;
105
+            }
106
+        } else {
107
+            $this->closed = true;
108
+        }
109
+    }
110 110
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -83,17 +83,17 @@
 block discarded – undo
83 83
 		$date = date($this->getDatePattern());
84 84
 		$fileName = sprintf($fileName, $date);
85 85
 		
86
-		if(!is_file($fileName)) {
86
+		if (!is_file($fileName)) {
87 87
 			$dir = dirname($fileName);
88
-			if(!is_dir($dir)) {
88
+			if (!is_dir($dir)) {
89 89
 				mkdir($dir, 0777, true);
90 90
 			}
91 91
 		}
92 92
 	
93
-		$this->fp = fopen($fileName, ($this->getAppend()? 'a':'w'));
94
-		if($this->fp) {
95
-			if(flock($this->fp, LOCK_EX)) {
96
-				if($this->getAppend()) {
93
+		$this->fp = fopen($fileName, ($this->getAppend() ? 'a' : 'w'));
94
+		if ($this->fp) {
95
+			if (flock($this->fp, LOCK_EX)) {
96
+				if ($this->getAppend()) {
97 97
 					fseek($this->fp, 0, SEEK_END);
98 98
 				}
99 99
 				fwrite($this->fp, $this->layout->getHeader());
Please login to merge, or discard this patch.
lib/Payone/Log4php/LoggerPatternConverterLevel.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
  */
27 27
 class Payone_Log4php_LoggerPatternConverterLevel extends Payone_Log4php_LoggerPatternConverter {
28 28
 
29
-	public function convert(Payone_Log4php_LoggerLoggingEvent $event) {
30
-		return $event->getLevel()->toString();
31
-	}
29
+    public function convert(Payone_Log4php_LoggerLoggingEvent $event) {
30
+        return $event->getLevel()->toString();
31
+    }
32 32
 }
Please login to merge, or discard this patch.