Completed
Push — master ( 06e75e...4dd477 )
by Florian
06:57
created
lib/Payone/Log4php/LoggerAppenderPhp.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -41,16 +41,16 @@
 block discarded – undo
41 41
  */ 
42 42
 class Payone_Log4php_LoggerAppenderPhp extends Payone_Log4php_LoggerAppender {
43 43
 
44
-	public function append(Payone_Log4php_LoggerLoggingEvent $event) {
45
-		if($this->layout !== null) {
46
-			$level = $event->getLevel();
47
-			if($level->isGreaterOrEqual(Payone_Log4php_LoggerLevel::getLevelError())) {
48
-				trigger_error($this->layout->format($event), E_USER_ERROR);
49
-			} else if ($level->isGreaterOrEqual(Payone_Log4php_LoggerLevel::getLevelWarn())) {
50
-				trigger_error($this->layout->format($event), E_USER_WARNING);
51
-			} else {
52
-				trigger_error($this->layout->format($event), E_USER_NOTICE);
53
-			}
54
-		}
55
-	}
44
+    public function append(Payone_Log4php_LoggerLoggingEvent $event) {
45
+        if($this->layout !== null) {
46
+            $level = $event->getLevel();
47
+            if($level->isGreaterOrEqual(Payone_Log4php_LoggerLevel::getLevelError())) {
48
+                trigger_error($this->layout->format($event), E_USER_ERROR);
49
+            } else if ($level->isGreaterOrEqual(Payone_Log4php_LoggerLevel::getLevelWarn())) {
50
+                trigger_error($this->layout->format($event), E_USER_WARNING);
51
+            } else {
52
+                trigger_error($this->layout->format($event), E_USER_NOTICE);
53
+            }
54
+        }
55
+    }
56 56
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,9 +42,9 @@
 block discarded – undo
42 42
 class Payone_Log4php_LoggerAppenderPhp extends Payone_Log4php_LoggerAppender {
43 43
 
44 44
 	public function append(Payone_Log4php_LoggerLoggingEvent $event) {
45
-		if($this->layout !== null) {
45
+		if ($this->layout !== null) {
46 46
 			$level = $event->getLevel();
47
-			if($level->isGreaterOrEqual(Payone_Log4php_LoggerLevel::getLevelError())) {
47
+			if ($level->isGreaterOrEqual(Payone_Log4php_LoggerLevel::getLevelError())) {
48 48
 				trigger_error($this->layout->format($event), E_USER_ERROR);
49 49
 			} else if ($level->isGreaterOrEqual(Payone_Log4php_LoggerLevel::getLevelWarn())) {
50 50
 				trigger_error($this->layout->format($event), E_USER_WARNING);
Please login to merge, or discard this patch.
lib/Payone/Log4php/LoggerRendererDefault.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -39,13 +39,13 @@
 block discarded – undo
39 39
  */
40 40
 class Payone_Log4php_LoggerRendererDefault implements Payone_Log4php_LoggerRendererObject {
41 41
 
42
-	/**
43
-	 * Render objects by type casting
44
-	 *
45
-	 * @param mixed $o the object to render
46
-	 * @return string
47
-	 */
48
-	public function render($o) {
49
-		return var_export($o, true);
50
-	}
42
+    /**
43
+     * Render objects by type casting
44
+     *
45
+     * @param mixed $o the object to render
46
+     * @return string
47
+     */
48
+    public function render($o) {
49
+        return var_export($o, true);
50
+    }
51 51
 }
Please login to merge, or discard this patch.
lib/Payone/Log4php/LoggerPatternConverterSuperglobal.php 2 patches
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -35,21 +35,21 @@  discard block
 block discarded – undo
35 35
  */
36 36
 abstract class Payone_Log4php_LoggerPatternConverterSuperglobal extends Payone_Log4php_LoggerPatternConverter {
37 37
 
38
-	/** 
39
-	 * Name of the superglobal variable, to be defined by subclasses. 
40
-	 * For example: "_SERVER" or "_ENV". 
41
-	 */
42
-	protected $name;
38
+    /** 
39
+     * Name of the superglobal variable, to be defined by subclasses. 
40
+     * For example: "_SERVER" or "_ENV". 
41
+     */
42
+    protected $name;
43 43
 	
44
-	protected $value = '';
44
+    protected $value = '';
45 45
 	
46
-	public function activateOptions() {
47
-		// Read the key from options array
48
-		if (isset($this->option) && $this->option !== '') {
49
-			$key = $this->option;
50
-		}
46
+    public function activateOptions() {
47
+        // Read the key from options array
48
+        if (isset($this->option) && $this->option !== '') {
49
+            $key = $this->option;
50
+        }
51 51
 	
52
-		/*
52
+        /*
53 53
 		 * There is a bug in PHP which doesn't allow superglobals to be 
54 54
 		 * accessed when their name is stored in a variable, e.g.:
55 55
 		 * 
@@ -65,35 +65,35 @@  discard block
 block discarded – undo
65 65
 		 * 
66 66
 		 * That's why global is used here.
67 67
 		 */
68
-		global ${$this->name};
68
+        global ${$this->name};
69 69
 			
70
-		// Check the given superglobal exists. It is possible that it is not initialized.
71
-		if (!isset(${$this->name})) {
72
-			$class = get_class($this);
73
-			trigger_error("log4php: $class: Cannot find superglobal variable \${$this->name}.", E_USER_WARNING);
74
-			return;
75
-		}
70
+        // Check the given superglobal exists. It is possible that it is not initialized.
71
+        if (!isset(${$this->name})) {
72
+            $class = get_class($this);
73
+            trigger_error("log4php: $class: Cannot find superglobal variable \${$this->name}.", E_USER_WARNING);
74
+            return;
75
+        }
76 76
 		
77
-		$source = ${$this->name};
77
+        $source = ${$this->name};
78 78
 		
79
-		// When the key is set, display the matching value
80
-		if (isset($key)) {
81
-			if (isset($source[$key])) {
82
-				$this->value = $source[$key]; 
83
-			}
84
-		}
79
+        // When the key is set, display the matching value
80
+        if (isset($key)) {
81
+            if (isset($source[$key])) {
82
+                $this->value = $source[$key]; 
83
+            }
84
+        }
85 85
 		
86
-		// When the key is not set, display all values
87
-		else {
88
-			$values = array();
89
-			foreach($source as $key => $value) {
90
-				$values[] = "$key=$value";
91
-			}
92
-			$this->value = implode(', ', $values);			
93
-		}
94
-	}
86
+        // When the key is not set, display all values
87
+        else {
88
+            $values = array();
89
+            foreach($source as $key => $value) {
90
+                $values[] = "$key=$value";
91
+            }
92
+            $this->value = implode(', ', $values);			
93
+        }
94
+    }
95 95
 	
96
-	public function convert(Payone_Log4php_LoggerLoggingEvent $event) {
97
-		return $this->value;
98
-	}
96
+    public function convert(Payone_Log4php_LoggerLoggingEvent $event) {
97
+        return $this->value;
98
+    }
99 99
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
 		// When the key is not set, display all values
87 87
 		else {
88 88
 			$values = array();
89
-			foreach($source as $key => $value) {
89
+			foreach ($source as $key => $value) {
90 90
 				$values[] = "$key=$value";
91 91
 			}
92 92
 			$this->value = implode(', ', $values);			
Please login to merge, or discard this patch.
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.