Completed
Push — master ( e92961...2a4a7d )
by Florian
05:04
created
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.
lib/Payone/Log4php/LoggerPatternConverterRequest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,5 +29,5 @@
 block discarded – undo
29 29
  * @subpackage pattern
30 30
  */
31 31
 class Payone_Log4php_LoggerPatternConverterRequest extends Payone_Log4php_LoggerPatternConverterSuperglobal {
32
-	protected $name = '_REQUEST';
32
+    protected $name = '_REQUEST';
33 33
 }
34 34
\ No newline at end of file
Please login to merge, or discard this patch.
lib/Payone/Log4php/LoggerThrowableInformation.php 2 patches
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -26,51 +26,51 @@
 block discarded – undo
26 26
  */
27 27
 class Payone_Log4php_LoggerThrowableInformation {
28 28
 	
29
-	/** @var Exception Throwable to log */
30
-	private $throwable;
29
+    /** @var Exception Throwable to log */
30
+    private $throwable;
31 31
 	
32
-	/** @var array Array of throwable messages */
33
-	private $throwableArray;
32
+    /** @var array Array of throwable messages */
33
+    private $throwableArray;
34 34
 	
35
-	/** @var Logger reference */
36
-	private $logger;
35
+    /** @var Logger reference */
36
+    private $logger;
37 37
 	
38
-	/**
39
-	 * Create a new instance
40
-	 * 
41
-	 * @param $throwable - a throwable as a exception
42
-	 * @param $logger - Logger reference
43
-	 */
44
-	public function __construct(Exception $throwable)  {
45
-		$this->throwable = $throwable;
46
-	}
38
+    /**
39
+     * Create a new instance
40
+     * 
41
+     * @param $throwable - a throwable as a exception
42
+     * @param $logger - Logger reference
43
+     */
44
+    public function __construct(Exception $throwable)  {
45
+        $this->throwable = $throwable;
46
+    }
47 47
 	
48
-	/**
49
-	* Return source exception
50
-	* 
51
-	* @return Exception
52
-	*/
53
-	public function getThrowable() {
54
-		return $this->throwable;
55
-	}
48
+    /**
49
+     * Return source exception
50
+     * 
51
+     * @return Exception
52
+     */
53
+    public function getThrowable() {
54
+        return $this->throwable;
55
+    }
56 56
 	
57
-	/**
58
-	 * @desc Returns string representation of throwable
59
-	 * 
60
-	 * @return array 
61
-	 */
62
-	public function getStringRepresentation() {
63
-		if (!is_array($this->throwableArray)) {
64
-			$renderer = Payone_Log4php_Logger::getHierarchy()->getRendererMap()->getByClassName(get_class($this->throwable));
57
+    /**
58
+     * @desc Returns string representation of throwable
59
+     * 
60
+     * @return array 
61
+     */
62
+    public function getStringRepresentation() {
63
+        if (!is_array($this->throwableArray)) {
64
+            $renderer = Payone_Log4php_Logger::getHierarchy()->getRendererMap()->getByClassName(get_class($this->throwable));
65 65
 			
66
-			// TODO: why this?
67
-			if ($renderer instanceof Payone_Log4php_LoggerRendererDefault) {
68
-				$renderer = new Payone_Log4php_LoggerRendererException();
69
-			}
70
-			$this->throwableArray = explode("\n", $renderer->render($this->throwable));
71
-		}
66
+            // TODO: why this?
67
+            if ($renderer instanceof Payone_Log4php_LoggerRendererDefault) {
68
+                $renderer = new Payone_Log4php_LoggerRendererException();
69
+            }
70
+            $this->throwableArray = explode("\n", $renderer->render($this->throwable));
71
+        }
72 72
 		
73
-		return $this->throwableArray;
74
-	}
73
+        return $this->throwableArray;
74
+    }
75 75
 }
76 76
 ?>
77 77
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 	 * @param $throwable - a throwable as a exception
42 42
 	 * @param $logger - Logger reference
43 43
 	 */
44
-	public function __construct(Exception $throwable)  {
44
+	public function __construct(Exception $throwable) {
45 45
 		$this->throwable = $throwable;
46 46
 	}
47 47
 	
Please login to merge, or discard this patch.
lib/Payone/Log4php/LoggerPatternConverterMessage.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_LoggerPatternConverterMessage extends Payone_Log4php_LoggerPatternConverter {
28 28
 
29
-	public function convert(Payone_Log4php_LoggerLoggingEvent $event) {
30
-		return $event->getRenderedMessage();
31
-	}
29
+    public function convert(Payone_Log4php_LoggerLoggingEvent $event) {
30
+        return $event->getRenderedMessage();
31
+    }
32 32
 }
Please login to merge, or discard this patch.
lib/Payone/Log4php/LoggerAppenderEcho.php 2 patches
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -41,45 +41,45 @@
 block discarded – undo
41 41
  * @subpackage appenders
42 42
  */
43 43
 class Payone_Log4php_LoggerAppenderEcho extends Payone_Log4php_LoggerAppender {
44
-	/** boolean used internally to mark first append */
45
-	protected $firstAppend = true;
44
+    /** boolean used internally to mark first append */
45
+    protected $firstAppend = true;
46 46
 	
47
-	/** 
48
-	 * If set to true, a <br /> element will be inserted before each line
49
-	 * break in the logged message. Default value is false. @var boolean 
50
-	 */
51
-	protected $htmlLineBreaks = false;
47
+    /** 
48
+     * If set to true, a <br /> element will be inserted before each line
49
+     * break in the logged message. Default value is false. @var boolean 
50
+     */
51
+    protected $htmlLineBreaks = false;
52 52
 	
53
-	public function close() {
54
-		if($this->closed != true) {
55
-			if(!$this->firstAppend) {
56
-				echo $this->layout->getFooter();
57
-			}
58
-		}
59
-		$this->closed = true;
60
-	}
53
+    public function close() {
54
+        if($this->closed != true) {
55
+            if(!$this->firstAppend) {
56
+                echo $this->layout->getFooter();
57
+            }
58
+        }
59
+        $this->closed = true;
60
+    }
61 61
 
62
-	public function append(Payone_Log4php_LoggerLoggingEvent $event) {
63
-		if($this->layout !== null) {
64
-			if($this->firstAppend) {
65
-				echo $this->layout->getHeader();
66
-				$this->firstAppend = false;
67
-			}
68
-			$text = $this->layout->format($event);
62
+    public function append(Payone_Log4php_LoggerLoggingEvent $event) {
63
+        if($this->layout !== null) {
64
+            if($this->firstAppend) {
65
+                echo $this->layout->getHeader();
66
+                $this->firstAppend = false;
67
+            }
68
+            $text = $this->layout->format($event);
69 69
 			
70
-			if ($this->htmlLineBreaks) {
71
-				$text = nl2br($text);
72
-			}
73
-			echo $text;
74
-		} 
75
-	}
70
+            if ($this->htmlLineBreaks) {
71
+                $text = nl2br($text);
72
+            }
73
+            echo $text;
74
+        } 
75
+    }
76 76
 	
77
-	public function setHtmlLineBreaks($value) {
78
-		$this->setBoolean('htmlLineBreaks', $value);
79
-	}
77
+    public function setHtmlLineBreaks($value) {
78
+        $this->setBoolean('htmlLineBreaks', $value);
79
+    }
80 80
 
81
-	public function getHtmlLineBreaks() {
82
-		return $this->htmlLineBreaks;
83
-	}
81
+    public function getHtmlLineBreaks() {
82
+        return $this->htmlLineBreaks;
83
+    }
84 84
 }
85 85
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
 	protected $htmlLineBreaks = false;
52 52
 	
53 53
 	public function close() {
54
-		if($this->closed != true) {
55
-			if(!$this->firstAppend) {
54
+		if ($this->closed != true) {
55
+			if (!$this->firstAppend) {
56 56
 				echo $this->layout->getFooter();
57 57
 			}
58 58
 		}
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
 	}
61 61
 
62 62
 	public function append(Payone_Log4php_LoggerLoggingEvent $event) {
63
-		if($this->layout !== null) {
64
-			if($this->firstAppend) {
63
+		if ($this->layout !== null) {
64
+			if ($this->firstAppend) {
65 65
 				echo $this->layout->getHeader();
66 66
 				$this->firstAppend = false;
67 67
 			}
Please login to merge, or discard this patch.