Completed
Push — master ( 06e75e...4dd477 )
by Florian
06:57
created
lib/Payone/Api/Request/Parameter/ManageMandate/PersonalData.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@
 block discarded – undo
181 181
     }
182 182
 
183 183
     /**
184
-     * @return string
184
+     * @return integer
185 185
      */
186 186
     public function getUserid()
187 187
     {
Please login to merge, or discard this patch.
lib/Payone/Api/Request/Parameter/Vauthorization/PersonalData.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     }
96 96
 
97 97
     /**
98
-     * @return string
98
+     * @return integer
99 99
      */
100 100
     public function getBirthday()
101 101
     {
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     }
260 260
 
261 261
     /**
262
-     * @return string
262
+     * @return integer
263 263
      */
264 264
     public function getUserid()
265 265
     {
Please login to merge, or discard this patch.
lib/Payone/Api/Response/Abstract.php 3 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
     }
225 225
 
226 226
     /**
227
-     * @param $name
227
+     * @param string $name
228 228
      * @return null|mixed
229 229
      */
230 230
     protected function get($name)
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 
238 238
     /**
239 239
      * @param string $name
240
-     * @param mixed $value
240
+     * @param string $value
241 241
      * @return boolean|null
242 242
      */
243 243
     protected function set($name, $value)
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
         $this->rawResponse = $rawResponse;
258 258
     }
259 259
     /**
260
-     * @return null
260
+     * @return string
261 261
      */
262 262
     public function getRawResponse()
263 263
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
     
100 100
     protected function _toString($aValue)
101 101
     {
102
-        if($this->applyFilters) {
102
+        if ($this->applyFilters) {
103 103
             $result = $this->applyFilters->apply($aValue);
104 104
         } else {
105 105
             $protocolFactory     = new Payone_Protocol_Factory();
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,8 +75,7 @@
 block discarded – undo
75 75
         foreach ($this as $key => $data) {
76 76
             if ($data === null) {
77 77
                 continue;
78
-            }
79
-            elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) {
78
+            } elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) {
80 79
                 $result[$key] = $data;
81 80
             }
82 81
         }
Please login to merge, or discard this patch.
lib/Payone/Api/Response/Parameter/Paydata/DataItem.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,6 @@
 block discarded – undo
30 30
     protected $data = NULL;
31 31
 
32 32
     /**
33
-     * @param int $key
34 33
      * @return array
35 34
      */
36 35
     public function toArray()
Please login to merge, or discard this patch.
lib/Payone/Builder.php 2 patches
Doc Comments   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     /**
66 66
      * @api
67 67
      *
68
-     * @return Payone_ClientApi_Service_GenerateHash
68
+     * @return Payone_Api_Service_Payment_Abstract
69 69
      */
70 70
     public function buildServiceClientApiGenerateHash() {
71 71
         return $this->buildService(self::KEY_CLIENTAPI . '/generateHash');
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     /**
120 120
      * @api
121 121
      *
122
-     * @return Payone_Api_Service_Verification_3dsCheck
122
+     * @return Payone_Api_Service_Payment_Abstract
123 123
      */
124 124
     public function buildServiceVerification3dsCheck() {
125 125
         return $this->buildService(self::KEY_API . '/verification/3dscheck');
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     /**
129 129
      * @api
130 130
      *
131
-     * @return Payone_Api_Service_Management_GetInvoice
131
+     * @return Payone_Api_Service_Payment_Abstract
132 132
      */
133 133
     public function buildServiceManagementGetInvoice() {
134 134
         return $this->buildService(self::KEY_API . '/management/getInvoice');
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
     /**
138 138
      * @api
139 139
      *
140
-     * @return Payone_Api_Service_Management_GetFile
140
+     * @return Payone_Api_Service_Payment_Abstract
141 141
      */
142 142
     public function buildServiceManagementGetFile() {
143 143
         return $this->buildService(self::KEY_API . '/management/getFile');
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
     /**
147 147
      * @api
148 148
      *
149
-     * @return Payone_Api_Service_Management_ManageMandate
149
+     * @return Payone_Api_Service_Payment_Abstract
150 150
      */
151 151
     public function buildServiceManagementManageMandate() {
152 152
         return $this->buildService(self::KEY_API . '/management/manageMandate');
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     /**
156 156
      * @api
157 157
      *
158
-     * @return Payone_Api_Service_Verification_AddressCheck
158
+     * @return Payone_Api_Service_Payment_Abstract
159 159
      */
160 160
     public function buildServiceVerificationAddressCheck() {
161 161
         return $this->buildService(self::KEY_API . '/verification/addressCheck');
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
     /**
165 165
      * @api
166 166
      *
167
-     * @return Payone_Api_Service_Verification_CreditCardCheck
167
+     * @return Payone_Api_Service_Payment_Abstract
168 168
      */
169 169
     public function buildServiceVerificationCreditCardCheck() {
170 170
         return $this->buildService(self::KEY_API . '/verification/creditCardCheck');
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     /**
174 174
      * @api
175 175
      *
176
-     * @return Payone_Api_Service_Verification_BankAccountCheck
176
+     * @return Payone_Api_Service_Payment_Abstract
177 177
      */
178 178
     public function buildServiceVerificationBankAccountCheck() {
179 179
         return $this->buildService(self::KEY_API . '/verification/bankAccountCheck');
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     /**
183 183
      * @api
184 184
      *
185
-     * @return Payone_Api_Service_Verification_Consumerscore
185
+     * @return Payone_Api_Service_Payment_Abstract
186 186
      */
187 187
     public function buildServiceVerificationConsumerscore() {
188 188
         return $this->buildService(self::KEY_API . '/verification/consumerscore');
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
     /**
192 192
      * @api
193 193
      *
194
-     * @return Payone_Settings_Service_XmlGenerate
194
+     * @return Payone_Api_Service_Payment_Abstract
195 195
      */
196 196
     public function buildServiceSettingsXmlGenerate() {
197 197
         return $this->buildService(self::KEY_SETTINGS . '/xmlgenerate');
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
         if (is_array($validatorConfig)) {
390 390
             $validator = array();
391 391
             foreach ($validatorConfig as $config) {
392
-                if ($config === 'default' or ! class_exists($config)) {
392
+                if ($config === 'default' or !class_exists($config)) {
393 393
                     return null;
394 394
                 } else {
395 395
                     $validator[] = new $config();
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
             return $validator;
400 400
         } else {
401 401
             // Load validator by config (if non-default):
402
-            if ($validatorConfig === 'default' or ! class_exists($validatorConfig)) {
402
+            if ($validatorConfig === 'default' or !class_exists($validatorConfig)) {
403 403
                 return null;
404 404
             } else {
405 405
                 $validator = new $validatorConfig();
Please login to merge, or discard this patch.
lib/Payone/ClientApi/Factory.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
     /**
26 26
      * @param string $key Service Key, e.g. 'payment/refund'
27
-     * @return Payone_Api_Service_Payment_Authorize|Payone_Api_Service_Payment_Debit|Payone_Api_Service_Payment_Preauthorize|Payone_Api_Service_Payment_Refund
27
+     * @return Payone_ClientApi_Service_GenerateHash|null
28 28
      * @throws Exception
29 29
      */
30 30
     public function buildService($key)
Please login to merge, or discard this patch.
lib/Payone/Log4php/LoggerConfigurationAdapterXML.php 3 patches
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -69,6 +69,7 @@  discard block
 block discarded – undo
69 69
 	/**
70 70
 	 * Loads and validates the XML.
71 71
 	 * @param string $url Input XML.
72
+	 * @return SimpleXMLElement
72 73
 	 */
73 74
 	private function loadXML($url) {
74 75
 		if (!file_exists($url)) {
@@ -213,6 +214,7 @@  discard block
 block discarded – undo
213 214
 	
214 215
 	/** 
215 216
 	 * Parses a <logger> node for appender references and returns them in an array.
217
+	 * @param string $name
216 218
 	 */
217 219
 	private function parseAppenderReferences(SimpleXMLElement $node, $name) {
218 220
 		$refs = array();
@@ -247,6 +249,9 @@  discard block
 block discarded – undo
247 249
 	// ** Helper methods                       **
248 250
 	// ******************************************
249 251
 	
252
+	/**
253
+	 * @param string $name
254
+	 */
250 255
 	private function getAttributeValue(SimpleXMLElement $node, $name) {
251 256
 		return isset($node[$name]) ? (string) $node[$name] : null;
252 257
 	}
Please login to merge, or discard this patch.
Indentation   +174 added lines, -174 removed lines patch added patch discarded remove patch
@@ -29,231 +29,231 @@
 block discarded – undo
29 29
  */
30 30
 class LoggerConfigurationAdapterXML implements LoggerConfigurationAdapter
31 31
 {
32
-	/** Path to the XML schema used for validation. */
33
-	const SCHEMA_PATH = '/../xml/log4php.xsd';
32
+    /** Path to the XML schema used for validation. */
33
+    const SCHEMA_PATH = '/../xml/log4php.xsd';
34 34
 	
35
-	private $config = array(
36
-		'appenders' => array(),
37
-		'loggers' => array(),
38
-		'renderers' => array(),
39
-	);
35
+    private $config = array(
36
+        'appenders' => array(),
37
+        'loggers' => array(),
38
+        'renderers' => array(),
39
+    );
40 40
 	
41
-	public function convert($url)
42
-	{
43
-		$xml = $this->loadXML($url);
41
+    public function convert($url)
42
+    {
43
+        $xml = $this->loadXML($url);
44 44
 		
45
-		$this->parseConfiguration($xml);
45
+        $this->parseConfiguration($xml);
46 46
 
47
-		// Parse the <root> node
48
-		if (isset($xml->root)) {		
49
-			$this->parseRootLogger($xml->root);
50
-		}
47
+        // Parse the <root> node
48
+        if (isset($xml->root)) {		
49
+            $this->parseRootLogger($xml->root);
50
+        }
51 51
 		
52
-		// Process <logger> nodes
53
-		foreach($xml->logger as $logger) {
54
-			$this->parseLogger($logger);
55
-		} 
52
+        // Process <logger> nodes
53
+        foreach($xml->logger as $logger) {
54
+            $this->parseLogger($logger);
55
+        } 
56 56
 		
57
-		// Process <appender> nodes
58
-		foreach($xml->appender as $appender) {
59
-			$this->parseAppender($appender);
60
-		}
57
+        // Process <appender> nodes
58
+        foreach($xml->appender as $appender) {
59
+            $this->parseAppender($appender);
60
+        }
61 61
 		
62
-		// Process <renderer> nodes
63
-		foreach($xml->renderer as $rendererNode) {
64
-			$this->parseRenderer($rendererNode);
65
-		}
66
-		return $this->config;
67
-	}
62
+        // Process <renderer> nodes
63
+        foreach($xml->renderer as $rendererNode) {
64
+            $this->parseRenderer($rendererNode);
65
+        }
66
+        return $this->config;
67
+    }
68 68
 	
69
-	/**
70
-	 * Loads and validates the XML.
71
-	 * @param string $url Input XML.
72
-	 */
73
-	private function loadXML($url) {
74
-		if (!file_exists($url)) {
75
-			throw new Payone_Log4php_LoggerException("File [$url] does not exist.");
76
-		}
69
+    /**
70
+     * Loads and validates the XML.
71
+     * @param string $url Input XML.
72
+     */
73
+    private function loadXML($url) {
74
+        if (!file_exists($url)) {
75
+            throw new Payone_Log4php_LoggerException("File [$url] does not exist.");
76
+        }
77 77
 
78
-		libxml_clear_errors();
79
-		$oldValue = libxml_use_internal_errors(true);
78
+        libxml_clear_errors();
79
+        $oldValue = libxml_use_internal_errors(true);
80 80
 		
81
-		// Load XML
82
-		$xml = @simplexml_load_file($url);
83
-		if ($xml === false) {
81
+        // Load XML
82
+        $xml = @simplexml_load_file($url);
83
+        if ($xml === false) {
84 84
 			
85
-			$errorStr = "";
86
-			foreach(libxml_get_errors() as $error) {
87
-				$errorStr .= $error->message;
88
-			}
85
+            $errorStr = "";
86
+            foreach(libxml_get_errors() as $error) {
87
+                $errorStr .= $error->message;
88
+            }
89 89
 			
90
-			throw new Payone_Log4php_LoggerException("Error loading configuration file: " . trim($errorStr));
91
-		}
90
+            throw new Payone_Log4php_LoggerException("Error loading configuration file: " . trim($errorStr));
91
+        }
92 92
 		
93
-		libxml_clear_errors();
94
-		libxml_use_internal_errors($oldValue);
93
+        libxml_clear_errors();
94
+        libxml_use_internal_errors($oldValue);
95 95
 		
96
-		return $xml;
97
-	}
96
+        return $xml;
97
+    }
98 98
 	
99
-	/**
100
-	 * Parses the <configuration> node.
101
-	 */
102
-	private function parseConfiguration(SimpleXMLElement $xml) {
103
-		$attributes = $xml->attributes();
104
-		if (isset($attributes['threshold'])) {
105
-			$this->config['threshold'] = (string) $attributes['threshold'];
106
-		}
107
-	}
99
+    /**
100
+     * Parses the <configuration> node.
101
+     */
102
+    private function parseConfiguration(SimpleXMLElement $xml) {
103
+        $attributes = $xml->attributes();
104
+        if (isset($attributes['threshold'])) {
105
+            $this->config['threshold'] = (string) $attributes['threshold'];
106
+        }
107
+    }
108 108
 	
109
-	/** Parses an <appender> node. */
110
-	private function parseAppender(SimpleXMLElement $node) {
111
-		$name = $this->getAttributeValue($node, 'name');
112
-		if (empty($name)) {
113
-			$this->warn("An <appender> node is missing the required 'name' attribute. Skipping appender definition.");
114
-			return;
115
-		}
109
+    /** Parses an <appender> node. */
110
+    private function parseAppender(SimpleXMLElement $node) {
111
+        $name = $this->getAttributeValue($node, 'name');
112
+        if (empty($name)) {
113
+            $this->warn("An <appender> node is missing the required 'name' attribute. Skipping appender definition.");
114
+            return;
115
+        }
116 116
 		
117
-		$appender = array();
118
-		$appender['class'] = $this->getAttributeValue($node, 'class');
117
+        $appender = array();
118
+        $appender['class'] = $this->getAttributeValue($node, 'class');
119 119
 		
120
-		if (isset($node['threshold'])) {
121
-			$appender['threshold'] = $this->getAttributeValue($node, 'threshold');
122
-		}
120
+        if (isset($node['threshold'])) {
121
+            $appender['threshold'] = $this->getAttributeValue($node, 'threshold');
122
+        }
123 123
 		
124
-		if (isset($node->layout)) {
125
-			$appender['layout']= $this->parseLayout($node->layout, $name);
126
-		}
124
+        if (isset($node->layout)) {
125
+            $appender['layout']= $this->parseLayout($node->layout, $name);
126
+        }
127 127
 		
128
-		if (count($node->param) > 0) {
129
-			$appender['params'] = $this->parseParameters($node);
130
-		}
128
+        if (count($node->param) > 0) {
129
+            $appender['params'] = $this->parseParameters($node);
130
+        }
131 131
 		
132
-		foreach($node->filter as $filterNode) {
133
-			$appender['filters'][] = $this->parseFilter($filterNode);
134
-		}
132
+        foreach($node->filter as $filterNode) {
133
+            $appender['filters'][] = $this->parseFilter($filterNode);
134
+        }
135 135
 		
136
-		$this->config['appenders'][$name] = $appender;
137
-	}
136
+        $this->config['appenders'][$name] = $appender;
137
+    }
138 138
 	
139
-	/** Parses a <layout> node. */
140
-	private function parseLayout(SimpleXMLElement $node, $appenderName) {
141
-		$layout = array();
142
-		$layout['class'] = $this->getAttributeValue($node, 'class');
139
+    /** Parses a <layout> node. */
140
+    private function parseLayout(SimpleXMLElement $node, $appenderName) {
141
+        $layout = array();
142
+        $layout['class'] = $this->getAttributeValue($node, 'class');
143 143
 		
144
-		if (count($node->param) > 0) {
145
-			$layout['params'] = $this->parseParameters($node);
146
-		}
144
+        if (count($node->param) > 0) {
145
+            $layout['params'] = $this->parseParameters($node);
146
+        }
147 147
 		
148
-		return $layout;
149
-	}
148
+        return $layout;
149
+    }
150 150
 
151
-	/** Parses any <param> child nodes returning them in an array. */
152
-	private function parseParameters($paramsNode) {
153
-		$params = array();
151
+    /** Parses any <param> child nodes returning them in an array. */
152
+    private function parseParameters($paramsNode) {
153
+        $params = array();
154 154
 
155
-		foreach($paramsNode->param as $paramNode) {
156
-			if (empty($paramNode['name'])) {
157
-				$this->warn("A <param> node is missing the required 'name' attribute. Skipping parameter.");
158
-				continue;
159
-			}
155
+        foreach($paramsNode->param as $paramNode) {
156
+            if (empty($paramNode['name'])) {
157
+                $this->warn("A <param> node is missing the required 'name' attribute. Skipping parameter.");
158
+                continue;
159
+            }
160 160
 			
161
-			$name = $this->getAttributeValue($paramNode, 'name');
162
-			$value = $this->getAttributeValue($paramNode, 'value');
161
+            $name = $this->getAttributeValue($paramNode, 'name');
162
+            $value = $this->getAttributeValue($paramNode, 'value');
163 163
 			
164
-			$params[$name] = $value;
165
-		}
164
+            $params[$name] = $value;
165
+        }
166 166
 
167
-		return $params;
168
-	}
167
+        return $params;
168
+    }
169 169
 	
170
-	/** Parses a <root> node. */
171
-	private function parseRootLogger(SimpleXMLElement $node) {
172
-		$logger = array();
170
+    /** Parses a <root> node. */
171
+    private function parseRootLogger(SimpleXMLElement $node) {
172
+        $logger = array();
173 173
 		
174
-		if (isset($node->level)) {
175
-			$logger['level'] = $this->getAttributeValue($node->level, 'value');
176
-		}
174
+        if (isset($node->level)) {
175
+            $logger['level'] = $this->getAttributeValue($node->level, 'value');
176
+        }
177 177
 		
178
-		$logger['appenders'] = array();
179
-		foreach($node->appender_ref as $appender) {
180
-			$logger['appenders'][] = $this->getAttributeValue($appender, 'ref');
181
-		}
178
+        $logger['appenders'] = array();
179
+        foreach($node->appender_ref as $appender) {
180
+            $logger['appenders'][] = $this->getAttributeValue($appender, 'ref');
181
+        }
182 182
 		
183
-		$this->config['rootLogger'] = $logger;
184
-	}
183
+        $this->config['rootLogger'] = $logger;
184
+    }
185 185
 	
186
-	/** Parses a <logger> node. */
187
-	private function parseLogger(SimpleXMLElement $node) {
188
-		$logger = array();
186
+    /** Parses a <logger> node. */
187
+    private function parseLogger(SimpleXMLElement $node) {
188
+        $logger = array();
189 189
 		
190
-		$name = $this->getAttributeValue($node, 'name');
191
-		if (empty($name)) {
192
-			$this->warn("A <logger> node is missing the required 'name' attribute. Skipping logger definition.");
193
-			return;
194
-		}
190
+        $name = $this->getAttributeValue($node, 'name');
191
+        if (empty($name)) {
192
+            $this->warn("A <logger> node is missing the required 'name' attribute. Skipping logger definition.");
193
+            return;
194
+        }
195 195
 		
196
-		if (isset($node->level)) {
197
-			$logger['level'] = $this->getAttributeValue($node->level, 'value');
198
-		}
196
+        if (isset($node->level)) {
197
+            $logger['level'] = $this->getAttributeValue($node->level, 'value');
198
+        }
199 199
 		
200
-		if (isset($node['additivity'])) {
201
-			$logger['additivity'] = $this->getAttributeValue($node, 'additivity');
202
-		}
200
+        if (isset($node['additivity'])) {
201
+            $logger['additivity'] = $this->getAttributeValue($node, 'additivity');
202
+        }
203 203
 		
204
-		$logger['appenders'] = $this->parseAppenderReferences($node, $name);
204
+        $logger['appenders'] = $this->parseAppenderReferences($node, $name);
205 205
 
206
-		// Check for duplicate loggers
207
-		if (isset($this->config['loggers'][$name])) {
208
-			$this->warn("Duplicate logger definition [$name]. Overwriting.");
209
-		}
206
+        // Check for duplicate loggers
207
+        if (isset($this->config['loggers'][$name])) {
208
+            $this->warn("Duplicate logger definition [$name]. Overwriting.");
209
+        }
210 210
 		
211
-		$this->config['loggers'][$name] = $logger;
212
-	}
211
+        $this->config['loggers'][$name] = $logger;
212
+    }
213 213
 	
214
-	/** 
215
-	 * Parses a <logger> node for appender references and returns them in an array.
216
-	 */
217
-	private function parseAppenderReferences(SimpleXMLElement $node, $name) {
218
-		$refs = array();
219
-		foreach($node->appender_ref as $ref) {
220
-			$refs[] = $this->getAttributeValue($ref, 'ref');
221
-		}
214
+    /** 
215
+     * Parses a <logger> node for appender references and returns them in an array.
216
+     */
217
+    private function parseAppenderReferences(SimpleXMLElement $node, $name) {
218
+        $refs = array();
219
+        foreach($node->appender_ref as $ref) {
220
+            $refs[] = $this->getAttributeValue($ref, 'ref');
221
+        }
222 222
 		
223
-		return $refs;
224
-	}
223
+        return $refs;
224
+    }
225 225
 	
226
-	/** Parses a <filter> node. */
227
-	private function parseFilter($filterNode) {
228
-		$filter = array();
229
-		$filter['class'] = $this->getAttributeValue($filterNode, 'class');
226
+    /** Parses a <filter> node. */
227
+    private function parseFilter($filterNode) {
228
+        $filter = array();
229
+        $filter['class'] = $this->getAttributeValue($filterNode, 'class');
230 230
 		
231
-		if (count($filterNode->param) > 0) {
232
-			$filter['params'] = $this->parseParameters($filterNode);
233
-		}
231
+        if (count($filterNode->param) > 0) {
232
+            $filter['params'] = $this->parseParameters($filterNode);
233
+        }
234 234
 		
235
-		return $filter;
236
-	}
235
+        return $filter;
236
+    }
237 237
 	
238
-	/** Parses a <renderer> node. */
239
-	private function parseRenderer(SimpleXMLElement $node) {
240
-		$renderedClass = $this->getAttributeValue($node, 'renderedClass');
241
-		$renderingClass = $this->getAttributeValue($node, 'renderingClass');
238
+    /** Parses a <renderer> node. */
239
+    private function parseRenderer(SimpleXMLElement $node) {
240
+        $renderedClass = $this->getAttributeValue($node, 'renderedClass');
241
+        $renderingClass = $this->getAttributeValue($node, 'renderingClass');
242 242
 		
243
-		$this->config['renderers'][] = compact('renderedClass', 'renderingClass');
244
-	}
243
+        $this->config['renderers'][] = compact('renderedClass', 'renderingClass');
244
+    }
245 245
 	
246
-	// ******************************************
247
-	// ** Helper methods                       **
248
-	// ******************************************
246
+    // ******************************************
247
+    // ** Helper methods                       **
248
+    // ******************************************
249 249
 	
250
-	private function getAttributeValue(SimpleXMLElement $node, $name) {
251
-		return isset($node[$name]) ? (string) $node[$name] : null;
252
-	}
250
+    private function getAttributeValue(SimpleXMLElement $node, $name) {
251
+        return isset($node[$name]) ? (string) $node[$name] : null;
252
+    }
253 253
 	
254
-	private function warn($message) {
255
-		trigger_error("log4php: " . $message, E_USER_WARNING);
256
-	}
254
+    private function warn($message) {
255
+        trigger_error("log4php: " . $message, E_USER_WARNING);
256
+    }
257 257
 }
258 258
 
259 259
 ?>
260 260
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -50,17 +50,17 @@  discard block
 block discarded – undo
50 50
 		}
51 51
 		
52 52
 		// Process <logger> nodes
53
-		foreach($xml->logger as $logger) {
53
+		foreach ($xml->logger as $logger) {
54 54
 			$this->parseLogger($logger);
55 55
 		} 
56 56
 		
57 57
 		// Process <appender> nodes
58
-		foreach($xml->appender as $appender) {
58
+		foreach ($xml->appender as $appender) {
59 59
 			$this->parseAppender($appender);
60 60
 		}
61 61
 		
62 62
 		// Process <renderer> nodes
63
-		foreach($xml->renderer as $rendererNode) {
63
+		foreach ($xml->renderer as $rendererNode) {
64 64
 			$this->parseRenderer($rendererNode);
65 65
 		}
66 66
 		return $this->config;
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		if ($xml === false) {
84 84
 			
85 85
 			$errorStr = "";
86
-			foreach(libxml_get_errors() as $error) {
86
+			foreach (libxml_get_errors() as $error) {
87 87
 				$errorStr .= $error->message;
88 88
 			}
89 89
 			
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	private function parseConfiguration(SimpleXMLElement $xml) {
103 103
 		$attributes = $xml->attributes();
104 104
 		if (isset($attributes['threshold'])) {
105
-			$this->config['threshold'] = (string) $attributes['threshold'];
105
+			$this->config['threshold'] = (string)$attributes['threshold'];
106 106
 		}
107 107
 	}
108 108
 	
@@ -122,14 +122,14 @@  discard block
 block discarded – undo
122 122
 		}
123 123
 		
124 124
 		if (isset($node->layout)) {
125
-			$appender['layout']= $this->parseLayout($node->layout, $name);
125
+			$appender['layout'] = $this->parseLayout($node->layout, $name);
126 126
 		}
127 127
 		
128 128
 		if (count($node->param) > 0) {
129 129
 			$appender['params'] = $this->parseParameters($node);
130 130
 		}
131 131
 		
132
-		foreach($node->filter as $filterNode) {
132
+		foreach ($node->filter as $filterNode) {
133 133
 			$appender['filters'][] = $this->parseFilter($filterNode);
134 134
 		}
135 135
 		
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 	private function parseParameters($paramsNode) {
153 153
 		$params = array();
154 154
 
155
-		foreach($paramsNode->param as $paramNode) {
155
+		foreach ($paramsNode->param as $paramNode) {
156 156
 			if (empty($paramNode['name'])) {
157 157
 				$this->warn("A <param> node is missing the required 'name' attribute. Skipping parameter.");
158 158
 				continue;
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 		}
177 177
 		
178 178
 		$logger['appenders'] = array();
179
-		foreach($node->appender_ref as $appender) {
179
+		foreach ($node->appender_ref as $appender) {
180 180
 			$logger['appenders'][] = $this->getAttributeValue($appender, 'ref');
181 181
 		}
182 182
 		
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 	 */
217 217
 	private function parseAppenderReferences(SimpleXMLElement $node, $name) {
218 218
 		$refs = array();
219
-		foreach($node->appender_ref as $ref) {
219
+		foreach ($node->appender_ref as $ref) {
220 220
 			$refs[] = $this->getAttributeValue($ref, 'ref');
221 221
 		}
222 222
 		
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 	// ******************************************
249 249
 	
250 250
 	private function getAttributeValue(SimpleXMLElement $node, $name) {
251
-		return isset($node[$name]) ? (string) $node[$name] : null;
251
+		return isset($node[$name]) ? (string)$node[$name] : null;
252 252
 	}
253 253
 	
254 254
 	private function warn($message) {
Please login to merge, or discard this patch.
lib/Payone/Log4php/LoggerConfiguratorDefault.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -404,7 +404,7 @@
 block discarded – undo
404 404
 	/**
405 405
 	 * Configures a logger. 
406 406
 	 * 
407
-	 * @param Logger $logger The logger to configure
407
+	 * @param Payone_Log4php_Logger $logger The logger to configure
408 408
 	 * @param array $config Logger configuration options.
409 409
 	 */
410 410
 	private function configureLogger(Payone_Log4php_Logger $logger, $config) {
Please login to merge, or discard this patch.
Indentation   +382 added lines, -382 removed lines patch added patch discarded remove patch
@@ -30,24 +30,24 @@  discard block
 block discarded – undo
30 30
  */
31 31
 class Payone_Log4php_LoggerConfiguratorDefault implements Payone_Log4php_LoggerConfigurator
32 32
 {
33
-	/** XML configuration file format. */
34
-	const FORMAT_XML = 'xml';
33
+    /** XML configuration file format. */
34
+    const FORMAT_XML = 'xml';
35 35
 	
36
-	/** PHP configuration file format. */
37
-	const FORMAT_PHP = 'php';
36
+    /** PHP configuration file format. */
37
+    const FORMAT_PHP = 'php';
38 38
 	
39
-	/** INI (properties) configuration file format. */
40
-	const FORMAT_INI = 'ini';
39
+    /** INI (properties) configuration file format. */
40
+    const FORMAT_INI = 'ini';
41 41
 
42
-	/** Defines which adapter should be used for parsing which format. */
43
-	private $adapters = array(
44
-		self::FORMAT_XML => 'Payone_Log4php_LoggerConfigurationAdapterXML',
45
-		self::FORMAT_INI => 'Payone_Log4php_LoggerConfigurationAdapterINI',
46
-		self::FORMAT_PHP => 'Payone_Log4php_LoggerConfigurationAdapterPHP',
47
-	);
42
+    /** Defines which adapter should be used for parsing which format. */
43
+    private $adapters = array(
44
+        self::FORMAT_XML => 'Payone_Log4php_LoggerConfigurationAdapterXML',
45
+        self::FORMAT_INI => 'Payone_Log4php_LoggerConfigurationAdapterINI',
46
+        self::FORMAT_PHP => 'Payone_Log4php_LoggerConfigurationAdapterPHP',
47
+    );
48 48
 	
49
-	/** Default configuration; used if no configuration file is provided. */
50
-	private static $defaultConfiguration = array(
49
+    /** Default configuration; used if no configuration file is provided. */
50
+    private static $defaultConfiguration = array(
51 51
         'threshold' => 'ALL',
52 52
         'rootLogger' => array(
53 53
             'level' => 'DEBUG',
@@ -61,425 +61,425 @@  discard block
 block discarded – undo
61 61
                 ),
62 62
             ),
63 63
         ),
64
-	);
64
+    );
65 65
 	
66
-	/** Holds the appenders before they are linked to loggers. */
67
-	private $appenders = array();
66
+    /** Holds the appenders before they are linked to loggers. */
67
+    private $appenders = array();
68 68
 	
69
-	/**
70
-	 * Configures log4php based on the given configuration. The input can 
71
-	 * either be a path to the config file, or a PHP array holding the 
72
-	 * configuration. 
73
-	 * 
74
-	 * If no configuration is given, or if the given configuration cannot be
75
-	 * parsed for whatever reason, a warning will be issued, and log4php
76
-	 * will use the default configuration contained in 
77
-	 * {@link $defaultConfiguration}.
78
-	 * 
79
-	 * @param Payone_Log4php_LoggerHierarchy $hierarchy The hierarchy on which to perform
80
-	 * 		the configuration. 
81
-	 * @param string|array $input Either path to the config file or the 
82
-	 * 		configuration as an array. If not set, default configuration 
83
-	 * 		will be used.
84
-	 */
85
-	public function configure(Payone_Log4php_LoggerHierarchy $hierarchy, $input = null) {
86
-		$config = $this->parse($input);
87
-		$this->doConfigure($hierarchy, $config);
88
-	}
69
+    /**
70
+     * Configures log4php based on the given configuration. The input can 
71
+     * either be a path to the config file, or a PHP array holding the 
72
+     * configuration. 
73
+     * 
74
+     * If no configuration is given, or if the given configuration cannot be
75
+     * parsed for whatever reason, a warning will be issued, and log4php
76
+     * will use the default configuration contained in 
77
+     * {@link $defaultConfiguration}.
78
+     * 
79
+     * @param Payone_Log4php_LoggerHierarchy $hierarchy The hierarchy on which to perform
80
+     * 		the configuration. 
81
+     * @param string|array $input Either path to the config file or the 
82
+     * 		configuration as an array. If not set, default configuration 
83
+     * 		will be used.
84
+     */
85
+    public function configure(Payone_Log4php_LoggerHierarchy $hierarchy, $input = null) {
86
+        $config = $this->parse($input);
87
+        $this->doConfigure($hierarchy, $config);
88
+    }
89 89
 	
90
-	/**
91
-	 * Parses the given configuration and returns the parsed configuration
92
-	 * as a PHP array. Does not perform any configuration. 
93
-	 * 
94
-	 * If no configuration is given, or if the given configuration cannot be
95
-	 * parsed for whatever reason, a warning will be issued, and the default 
96
-	 * configuration will be returned ({@link $defaultConfiguration}).
97
-	 * 
98
-	 * @param string|array $input Either path to the config file or the 
99
-	 * 		configuration as an array. If not set, default configuration 
100
-	 * 		will be used.
101
-	 * @return array The parsed configuration.
102
-	 */
103
-	public function parse($input)
104
-	{
105
-		// No input - use default configuration
106
-		if (!isset($input)) {
107
-			$config = self::$defaultConfiguration;
108
-		}
90
+    /**
91
+     * Parses the given configuration and returns the parsed configuration
92
+     * as a PHP array. Does not perform any configuration. 
93
+     * 
94
+     * If no configuration is given, or if the given configuration cannot be
95
+     * parsed for whatever reason, a warning will be issued, and the default 
96
+     * configuration will be returned ({@link $defaultConfiguration}).
97
+     * 
98
+     * @param string|array $input Either path to the config file or the 
99
+     * 		configuration as an array. If not set, default configuration 
100
+     * 		will be used.
101
+     * @return array The parsed configuration.
102
+     */
103
+    public function parse($input)
104
+    {
105
+        // No input - use default configuration
106
+        if (!isset($input)) {
107
+            $config = self::$defaultConfiguration;
108
+        }
109 109
 		
110
-		// Array input - contains configuration within the array
111
-		else if (is_array($input)) {
112
-			$config = $input;
113
-		}
110
+        // Array input - contains configuration within the array
111
+        else if (is_array($input)) {
112
+            $config = $input;
113
+        }
114 114
 		
115
-		// String input - contains path to configuration file
116
-		else if (is_string($input)) {
117
-			try {
118
-				$config = $this->parseFile($input);
119
-			} catch (Payone_Log4php_LoggerException $e) {
120
-				$this->warn("Configuration failed. " . $e->getMessage() . " Using default configuration.");
121
-				$config = self::$defaultConfiguration;
122
-			}
123
-		}
115
+        // String input - contains path to configuration file
116
+        else if (is_string($input)) {
117
+            try {
118
+                $config = $this->parseFile($input);
119
+            } catch (Payone_Log4php_LoggerException $e) {
120
+                $this->warn("Configuration failed. " . $e->getMessage() . " Using default configuration.");
121
+                $config = self::$defaultConfiguration;
122
+            }
123
+        }
124 124
 		
125
-		// Anything else is an error
126
-		else {
127
-			$this->warn("Invalid configuration param given. Reverting to default configuration.");
128
-			$config = self::$defaultConfiguration;
129
-		}
125
+        // Anything else is an error
126
+        else {
127
+            $this->warn("Invalid configuration param given. Reverting to default configuration.");
128
+            $config = self::$defaultConfiguration;
129
+        }
130 130
 		
131
-		return $config;
132
-	}
131
+        return $config;
132
+    }
133 133
 
134
-	/** 
135
-	 * Returns the default log4php configuration.
136
-	 * @return array
137
-	 */
138
-	public static function getDefaultConfiguration() {
139
-		return self::$defaultConfiguration;
140
-	} 
134
+    /** 
135
+     * Returns the default log4php configuration.
136
+     * @return array
137
+     */
138
+    public static function getDefaultConfiguration() {
139
+        return self::$defaultConfiguration;
140
+    } 
141 141
 	
142
-	/**
143
-	 * Loads the configuration file from the given URL, determines which
144
-	 * adapter to use, converts the configuration to a PHP array and
145
-	 * returns it.
146
-	 *
147
-	 * @param string $url Path to the config file.
148
-	 * @return The configuration from the config file, as a PHP array.
149
-	 * @throws LoggerException If the configuration file cannot be loaded, or
150
-	 * 		if the parsing fails.
151
-	 */
152
-	private function parseFile($url) {
142
+    /**
143
+     * Loads the configuration file from the given URL, determines which
144
+     * adapter to use, converts the configuration to a PHP array and
145
+     * returns it.
146
+     *
147
+     * @param string $url Path to the config file.
148
+     * @return The configuration from the config file, as a PHP array.
149
+     * @throws LoggerException If the configuration file cannot be loaded, or
150
+     * 		if the parsing fails.
151
+     */
152
+    private function parseFile($url) {
153 153
 		
154
-		if (!file_exists($url)) {
155
-			throw new Payone_Log4php_LoggerException("File not found at [$url].");
156
-		}
154
+        if (!file_exists($url)) {
155
+            throw new Payone_Log4php_LoggerException("File not found at [$url].");
156
+        }
157 157
 		
158
-		$type = $this->getConfigType($url);
159
-		$adapterClass = $this->adapters[$type];
158
+        $type = $this->getConfigType($url);
159
+        $adapterClass = $this->adapters[$type];
160 160
 
161
-		$adapter = new $adapterClass();
162
-		return $adapter->convert($url);
163
-	}
161
+        $adapter = new $adapterClass();
162
+        return $adapter->convert($url);
163
+    }
164 164
 	
165
-	/** Determines configuration file type based on the file extension. */
166
-	private function getConfigType($url) {
167
-		$info = pathinfo($url);
168
-		$ext = strtolower($info['extension']);
165
+    /** Determines configuration file type based on the file extension. */
166
+    private function getConfigType($url) {
167
+        $info = pathinfo($url);
168
+        $ext = strtolower($info['extension']);
169 169
 		
170
-		switch($ext) {
171
-			case 'xml':
172
-				return self::FORMAT_XML;
170
+        switch($ext) {
171
+            case 'xml':
172
+                return self::FORMAT_XML;
173 173
 			
174
-			case 'ini':
175
-			case 'properties':
176
-				return self::FORMAT_INI;
174
+            case 'ini':
175
+            case 'properties':
176
+                return self::FORMAT_INI;
177 177
 			
178
-			case 'php':
179
-				return self::FORMAT_PHP;
178
+            case 'php':
179
+                return self::FORMAT_PHP;
180 180
 				
181
-			default:
182
-				throw new Payone_Log4php_LoggerException("Unsupported configuration file extension: $ext");
183
-		}
184
-	}
181
+            default:
182
+                throw new Payone_Log4php_LoggerException("Unsupported configuration file extension: $ext");
183
+        }
184
+    }
185 185
 	
186
-	/**
187
-	 * Constructs the logger hierarchy based on configuration.
188
-	 * 
189
-	 * @param Payone_Log4php_LoggerHierarchy $hierarchy
190
-	 * @param array $config
191
-	 */
192
-	private function doConfigure(Payone_Log4php_LoggerHierarchy $hierarchy, $config) {
193
-		if (isset($config['threshold'])) {
194
-			$threshold = Payone_Log4php_LoggerLevel::toLevel($config['threshold']);
195
-			if (isset($threshold)) {
196
-				$hierarchy->setThreshold($threshold);
197
-			} else {
198
-				$this->warn("Invalid threshold value [{$config['threshold']}] specified. Ignoring threshold definition.");
199
-			}
200
-		}
186
+    /**
187
+     * Constructs the logger hierarchy based on configuration.
188
+     * 
189
+     * @param Payone_Log4php_LoggerHierarchy $hierarchy
190
+     * @param array $config
191
+     */
192
+    private function doConfigure(Payone_Log4php_LoggerHierarchy $hierarchy, $config) {
193
+        if (isset($config['threshold'])) {
194
+            $threshold = Payone_Log4php_LoggerLevel::toLevel($config['threshold']);
195
+            if (isset($threshold)) {
196
+                $hierarchy->setThreshold($threshold);
197
+            } else {
198
+                $this->warn("Invalid threshold value [{$config['threshold']}] specified. Ignoring threshold definition.");
199
+            }
200
+        }
201 201
 		
202
-		// Configure appenders and add them to the appender pool
203
-		if (isset($config['appenders']) && is_array($config['appenders'])) {
204
-			foreach($config['appenders'] as $name => $appenderConfig) {
205
-				$this->configureAppender($name, $appenderConfig);
206
-			}
207
-		}
202
+        // Configure appenders and add them to the appender pool
203
+        if (isset($config['appenders']) && is_array($config['appenders'])) {
204
+            foreach($config['appenders'] as $name => $appenderConfig) {
205
+                $this->configureAppender($name, $appenderConfig);
206
+            }
207
+        }
208 208
 		
209
-		// Configure root logger 
210
-		if (isset($config['rootLogger'])) {
211
-			$this->configureRootLogger($hierarchy, $config['rootLogger']);
212
-		}
209
+        // Configure root logger 
210
+        if (isset($config['rootLogger'])) {
211
+            $this->configureRootLogger($hierarchy, $config['rootLogger']);
212
+        }
213 213
 		
214
-		// Configure loggers
215
-		if (isset($config['loggers']) && is_array($config['loggers'])) {
216
-			foreach($config['loggers'] as $loggerName => $loggerConfig) {
217
-				$this->configureOtherLogger($hierarchy, $loggerName, $loggerConfig);
218
-			}
219
-		}
214
+        // Configure loggers
215
+        if (isset($config['loggers']) && is_array($config['loggers'])) {
216
+            foreach($config['loggers'] as $loggerName => $loggerConfig) {
217
+                $this->configureOtherLogger($hierarchy, $loggerName, $loggerConfig);
218
+            }
219
+        }
220 220
 
221
-		// Configure renderers
222
-		if (isset($config['renderers']) && is_array($config['renderers'])) {
223
-			foreach($config['renderers'] as $rendererConfig) {
224
-				$this->configureRenderer($hierarchy, $rendererConfig);
225
-			}
226
-		}
227
-	}
221
+        // Configure renderers
222
+        if (isset($config['renderers']) && is_array($config['renderers'])) {
223
+            foreach($config['renderers'] as $rendererConfig) {
224
+                $this->configureRenderer($hierarchy, $rendererConfig);
225
+            }
226
+        }
227
+    }
228 228
 	
229
-	private function configureRenderer(Payone_Log4php_LoggerHierarchy $hierarchy, $config) {
230
-		if (!isset($config['renderingClass'])) {
231
-			$this->warn("Rendering class not specified. Skipping renderers definition.");
232
-			return;			
233
-		}
229
+    private function configureRenderer(Payone_Log4php_LoggerHierarchy $hierarchy, $config) {
230
+        if (!isset($config['renderingClass'])) {
231
+            $this->warn("Rendering class not specified. Skipping renderers definition.");
232
+            return;			
233
+        }
234 234
 		
235
-		$renderingClass = $config['renderingClass'];
236
-		if (!class_exists($renderingClass)) {
237
-			$this->warn("Nonexistant rendering class [$renderingClass] specified. Skipping renderers definition.");
238
-			return;
239
-		}
235
+        $renderingClass = $config['renderingClass'];
236
+        if (!class_exists($renderingClass)) {
237
+            $this->warn("Nonexistant rendering class [$renderingClass] specified. Skipping renderers definition.");
238
+            return;
239
+        }
240 240
 		
241
-		$renderingClassInstance = new $renderingClass();
242
-		if (!$renderingClassInstance instanceof Payone_Log4php_LoggerRendererObject) {
243
-			$this->warn("Invalid class [$renderingClass] given. Not a valid Payone_Log4php_LoggerRenderer class. Skipping renderers definition.");
244
-			return;			
245
-		}
241
+        $renderingClassInstance = new $renderingClass();
242
+        if (!$renderingClassInstance instanceof Payone_Log4php_LoggerRendererObject) {
243
+            $this->warn("Invalid class [$renderingClass] given. Not a valid Payone_Log4php_LoggerRenderer class. Skipping renderers definition.");
244
+            return;			
245
+        }
246 246
 	
247
-		if (!isset($config['renderedClass'])) {
248
-			$this->warn("Rendered class not specified for rendering Class [$renderingClass]. Skipping renderers definition.");
249
-			return;			
250
-		}
247
+        if (!isset($config['renderedClass'])) {
248
+            $this->warn("Rendered class not specified for rendering Class [$renderingClass]. Skipping renderers definition.");
249
+            return;			
250
+        }
251 251
 		
252
-		$renderedClass = $config['renderedClass'];
253
-		if (!class_exists($renderedClass)) {
254
-			$this->warn("Nonexistant rendered class [$renderedClass] specified for renderer [$renderingClass]. Skipping renderers definition.");
255
-			return;
256
-		}		
252
+        $renderedClass = $config['renderedClass'];
253
+        if (!class_exists($renderedClass)) {
254
+            $this->warn("Nonexistant rendered class [$renderedClass] specified for renderer [$renderingClass]. Skipping renderers definition.");
255
+            return;
256
+        }		
257 257
 
258
-		$hierarchy->getRendererMap()->addRenderer($renderedClass, $renderingClassInstance);
259
-	}
258
+        $hierarchy->getRendererMap()->addRenderer($renderedClass, $renderingClassInstance);
259
+    }
260 260
 	
261
-	/** 
262
-	 * Configures an appender based on given config and saves it to 
263
-	 * {@link $appenders} array so it can be later linked to loggers. 
264
-	 * @param string $name Appender name. 
265
-	 * @param array $config Appender configuration options.
266
-	 */
267
-	private function configureAppender($name, $config) {
261
+    /** 
262
+     * Configures an appender based on given config and saves it to 
263
+     * {@link $appenders} array so it can be later linked to loggers. 
264
+     * @param string $name Appender name. 
265
+     * @param array $config Appender configuration options.
266
+     */
267
+    private function configureAppender($name, $config) {
268 268
 
269
-		// TODO: add this check to other places where it might be useful
270
-		if (!is_array($config)) {
271
-			$type = gettype($config);
272
-			$this->warn("Invalid configuration provided for appender [$name]. Expected an array, found <$type>. Skipping appender definition.");
273
-			return;
274
-		}
269
+        // TODO: add this check to other places where it might be useful
270
+        if (!is_array($config)) {
271
+            $type = gettype($config);
272
+            $this->warn("Invalid configuration provided for appender [$name]. Expected an array, found <$type>. Skipping appender definition.");
273
+            return;
274
+        }
275 275
 		
276
-		// Parse appender class
277
-		$class = $config['class'];
278
-		if (empty($class)) {
279
-			$this->warn("No class given for appender [$name]. Skipping appender definition.");
280
-			return;
281
-		}
282
-		if (!class_exists($class)) {
283
-			$this->warn("Invalid class [$class] given for appender [$name]. Class does not exist. Skipping appender definition.");
284
-			return;
285
-		}
276
+        // Parse appender class
277
+        $class = $config['class'];
278
+        if (empty($class)) {
279
+            $this->warn("No class given for appender [$name]. Skipping appender definition.");
280
+            return;
281
+        }
282
+        if (!class_exists($class)) {
283
+            $this->warn("Invalid class [$class] given for appender [$name]. Class does not exist. Skipping appender definition.");
284
+            return;
285
+        }
286 286
 		
287
-		// Instantiate the appender
288
-		$appender = new $class($name);
289
-		if (!($appender instanceof Payone_Log4php_LoggerAppender)) {
290
-			$this->warn("Invalid class [$class] given for appender [$name]. Not a valid Payone_Log4php_LoggerAppender class. Skipping appender definition.");
291
-			return;
292
-		}
287
+        // Instantiate the appender
288
+        $appender = new $class($name);
289
+        if (!($appender instanceof Payone_Log4php_LoggerAppender)) {
290
+            $this->warn("Invalid class [$class] given for appender [$name]. Not a valid Payone_Log4php_LoggerAppender class. Skipping appender definition.");
291
+            return;
292
+        }
293 293
 		
294
-		// Parse the appender threshold
295
-		if (isset($config['threshold'])) {
296
-			$threshold = Payone_Log4php_LoggerLevel::toLevel($config['threshold']);
297
-			if ($threshold instanceof Payone_Log4php_LoggerLevel) {
298
-				$appender->setThreshold($threshold);
299
-			} else {
300
-				$this->warn("Invalid threshold value [{$config['threshold']}] specified for appender [$name]. Ignoring threshold definition.");
301
-			}
302
-		}
294
+        // Parse the appender threshold
295
+        if (isset($config['threshold'])) {
296
+            $threshold = Payone_Log4php_LoggerLevel::toLevel($config['threshold']);
297
+            if ($threshold instanceof Payone_Log4php_LoggerLevel) {
298
+                $appender->setThreshold($threshold);
299
+            } else {
300
+                $this->warn("Invalid threshold value [{$config['threshold']}] specified for appender [$name]. Ignoring threshold definition.");
301
+            }
302
+        }
303 303
 		
304
-		// Parse the appender layout
305
-		if ($appender->requiresLayout() && isset($config['layout'])) {
306
-			$this->createAppenderLayout($appender, $config['layout']);
307
-		}
304
+        // Parse the appender layout
305
+        if ($appender->requiresLayout() && isset($config['layout'])) {
306
+            $this->createAppenderLayout($appender, $config['layout']);
307
+        }
308 308
 		
309
-		// Parse filters
310
-		if (isset($config['filters']) && is_array($config['filters'])) {
311
-			foreach($config['filters'] as $filterConfig) {
312
-				$this->createAppenderFilter($appender, $filterConfig);
313
-			}
314
-		}
309
+        // Parse filters
310
+        if (isset($config['filters']) && is_array($config['filters'])) {
311
+            foreach($config['filters'] as $filterConfig) {
312
+                $this->createAppenderFilter($appender, $filterConfig);
313
+            }
314
+        }
315 315
 		
316
-		// Set options if any
317
-		if (isset($config['params'])) {
318
-			$this->setOptions($appender, $config['params']);
319
-		}
316
+        // Set options if any
317
+        if (isset($config['params'])) {
318
+            $this->setOptions($appender, $config['params']);
319
+        }
320 320
 
321
-		// Activate and save for later linking to loggers
322
-		$appender->activateOptions();
323
-		$this->appenders[$name] = $appender;
324
-	}
321
+        // Activate and save for later linking to loggers
322
+        $appender->activateOptions();
323
+        $this->appenders[$name] = $appender;
324
+    }
325 325
 	
326
-	/**
327
-	 * Parses layout config, creates the layout and links it to the appender.
328
-	 * @param Payone_Log4php_LoggerAppender $appender
329
-	 * @param array $config Layout configuration.
330
-	 */
331
-	private function createAppenderLayout(Payone_Log4php_LoggerAppender $appender, $config) {
332
-		$name = $appender->getName();
333
-		$class = $config['class'];
334
-		if (empty($class)) {
335
-			$this->warn("Layout class not specified for appender [$name]. Reverting to default layout.");
336
-			return;
337
-		}
338
-		if (!class_exists($class)) {
339
-			$this->warn("Nonexistant layout class [$class] specified for appender [$name]. Reverting to default layout.");
340
-			return;
341
-		}
326
+    /**
327
+     * Parses layout config, creates the layout and links it to the appender.
328
+     * @param Payone_Log4php_LoggerAppender $appender
329
+     * @param array $config Layout configuration.
330
+     */
331
+    private function createAppenderLayout(Payone_Log4php_LoggerAppender $appender, $config) {
332
+        $name = $appender->getName();
333
+        $class = $config['class'];
334
+        if (empty($class)) {
335
+            $this->warn("Layout class not specified for appender [$name]. Reverting to default layout.");
336
+            return;
337
+        }
338
+        if (!class_exists($class)) {
339
+            $this->warn("Nonexistant layout class [$class] specified for appender [$name]. Reverting to default layout.");
340
+            return;
341
+        }
342 342
 		
343
-		$layout = new $class();
344
-		if (!($layout instanceof Payone_Log4php_LoggerLayout)) {
345
-			$this->warn("Invalid layout class [$class] sepcified for appender [$name]. Reverting to default layout.");
346
-			return;
347
-		}
343
+        $layout = new $class();
344
+        if (!($layout instanceof Payone_Log4php_LoggerLayout)) {
345
+            $this->warn("Invalid layout class [$class] sepcified for appender [$name]. Reverting to default layout.");
346
+            return;
347
+        }
348 348
 		
349
-		if (isset($config['params'])) {
350
-			$this->setOptions($layout, $config['params']);
351
-		}
349
+        if (isset($config['params'])) {
350
+            $this->setOptions($layout, $config['params']);
351
+        }
352 352
 		
353
-		$layout->activateOptions();
354
-		$appender->setLayout($layout);
355
-	}
353
+        $layout->activateOptions();
354
+        $appender->setLayout($layout);
355
+    }
356 356
 	
357
-	/**
358
-	 * Parses filter config, creates the filter and adds it to the appender's 
359
-	 * filter chain.
360
-	 * @param Payone_Log4php_LoggerAppender $appender
361
-	 * @param array $config Filter configuration.
362
-	 */
363
-	private function createAppenderFilter(Payone_Log4php_LoggerAppender $appender, $config) {
364
-		$name = $appender->getName();
365
-		$class = $config['class'];
366
-		if (!class_exists($class)) {
367
-			$this->warn("Nonexistant filter class [$class] specified on appender [$name]. Skipping filter definition.");
368
-			return;
369
-		}
357
+    /**
358
+     * Parses filter config, creates the filter and adds it to the appender's 
359
+     * filter chain.
360
+     * @param Payone_Log4php_LoggerAppender $appender
361
+     * @param array $config Filter configuration.
362
+     */
363
+    private function createAppenderFilter(Payone_Log4php_LoggerAppender $appender, $config) {
364
+        $name = $appender->getName();
365
+        $class = $config['class'];
366
+        if (!class_exists($class)) {
367
+            $this->warn("Nonexistant filter class [$class] specified on appender [$name]. Skipping filter definition.");
368
+            return;
369
+        }
370 370
 	
371
-		$filter = new $class();
372
-		if (!($filter instanceof Payone_Log4php_LoggerFilter)) {
373
-			$this->warn("Invalid filter class [$class] sepcified on appender [$name]. Skipping filter definition.");
374
-			return;
375
-		}
371
+        $filter = new $class();
372
+        if (!($filter instanceof Payone_Log4php_LoggerFilter)) {
373
+            $this->warn("Invalid filter class [$class] sepcified on appender [$name]. Skipping filter definition.");
374
+            return;
375
+        }
376 376
 	
377
-		if (isset($config['params'])) {
378
-			$this->setOptions($filter, $config['params']);
379
-		}
377
+        if (isset($config['params'])) {
378
+            $this->setOptions($filter, $config['params']);
379
+        }
380 380
 	
381
-		$filter->activateOptions();
382
-		$appender->addFilter($filter);
383
-	}
381
+        $filter->activateOptions();
382
+        $appender->addFilter($filter);
383
+    }
384 384
 	
385
-	/** 
386
-	 * Configures the root logger
387
-	 * @see configureLogger() 
388
-	 */
389
-	private function configureRootLogger(Payone_Log4php_LoggerHierarchy $hierarchy, $config) {
390
-		$logger = $hierarchy->getRootLogger();
391
-		$this->configureLogger($logger, $config);
392
-	}
385
+    /** 
386
+     * Configures the root logger
387
+     * @see configureLogger() 
388
+     */
389
+    private function configureRootLogger(Payone_Log4php_LoggerHierarchy $hierarchy, $config) {
390
+        $logger = $hierarchy->getRootLogger();
391
+        $this->configureLogger($logger, $config);
392
+    }
393 393
 
394
-	/**
395
-	 * Configures a logger which is not root.
396
-	 * @see configureLogger()
397
-	 */
398
-	private function configureOtherLogger(Payone_Log4php_LoggerHierarchy $hierarchy, $name, $config) {
399
-		// Get logger from hierarchy (this creates it if it doesn't already exist)
400
-		$logger = $hierarchy->getLogger($name);
401
-		$this->configureLogger($logger, $config);
402
-	}
394
+    /**
395
+     * Configures a logger which is not root.
396
+     * @see configureLogger()
397
+     */
398
+    private function configureOtherLogger(Payone_Log4php_LoggerHierarchy $hierarchy, $name, $config) {
399
+        // Get logger from hierarchy (this creates it if it doesn't already exist)
400
+        $logger = $hierarchy->getLogger($name);
401
+        $this->configureLogger($logger, $config);
402
+    }
403 403
 	
404
-	/**
405
-	 * Configures a logger. 
406
-	 * 
407
-	 * @param Logger $logger The logger to configure
408
-	 * @param array $config Logger configuration options.
409
-	 */
410
-	private function configureLogger(Payone_Log4php_Logger $logger, $config) {
411
-		$loggerName = $logger->getName();
404
+    /**
405
+     * Configures a logger. 
406
+     * 
407
+     * @param Logger $logger The logger to configure
408
+     * @param array $config Logger configuration options.
409
+     */
410
+    private function configureLogger(Payone_Log4php_Logger $logger, $config) {
411
+        $loggerName = $logger->getName();
412 412
 		
413
-		// Set logger level
414
-		if (isset($config['level'])) {
415
-			$level = Payone_Log4php_LoggerLevel::toLevel($config['level']);
416
-			if (isset($level)) {
417
-				$logger->setLevel($level);
418
-			} else {
419
-				$default = $logger->getLevel();
420
-				$this->warn("Invalid level value [{$config['level']}] specified for logger [$loggerName]. Ignoring level definition.");
421
-			}
422
-		}
413
+        // Set logger level
414
+        if (isset($config['level'])) {
415
+            $level = Payone_Log4php_LoggerLevel::toLevel($config['level']);
416
+            if (isset($level)) {
417
+                $logger->setLevel($level);
418
+            } else {
419
+                $default = $logger->getLevel();
420
+                $this->warn("Invalid level value [{$config['level']}] specified for logger [$loggerName]. Ignoring level definition.");
421
+            }
422
+        }
423 423
 		
424
-		// Link appenders to logger
425
-		if (isset($config['appenders'])) {
426
-			foreach($config['appenders'] as $appenderName) {
427
-				if (isset($this->appenders[$appenderName])) {
428
-					$logger->addAppender($this->appenders[$appenderName]);
429
-				} else {
430
-					$this->warn("Nonexistnant appender [$appenderName] linked to logger [$loggerName].");
431
-				}
432
-			}
433
-		}
424
+        // Link appenders to logger
425
+        if (isset($config['appenders'])) {
426
+            foreach($config['appenders'] as $appenderName) {
427
+                if (isset($this->appenders[$appenderName])) {
428
+                    $logger->addAppender($this->appenders[$appenderName]);
429
+                } else {
430
+                    $this->warn("Nonexistnant appender [$appenderName] linked to logger [$loggerName].");
431
+                }
432
+            }
433
+        }
434 434
 		
435
-		// Set logger additivity
436
-		if (isset($config['additivity'])) {
437
-			$additivity = Payone_Log4php_LoggerOptionConverter::toBoolean($config['additivity'], null);
438
-			if (is_bool($additivity)) {
439
-				$logger->setAdditivity($additivity);
440
-			} else {
441
-				$this->warn("Invalid additivity value [{$config['additivity']}] specified for logger [$loggerName]. Ignoring additivity setting.");
442
-			}
443
-		}
444
-	}
435
+        // Set logger additivity
436
+        if (isset($config['additivity'])) {
437
+            $additivity = Payone_Log4php_LoggerOptionConverter::toBoolean($config['additivity'], null);
438
+            if (is_bool($additivity)) {
439
+                $logger->setAdditivity($additivity);
440
+            } else {
441
+                $this->warn("Invalid additivity value [{$config['additivity']}] specified for logger [$loggerName]. Ignoring additivity setting.");
442
+            }
443
+        }
444
+    }
445 445
 
446
-	/**
447
-	 * Helper method which applies given options to an object which has setters
448
-	 * for these options (such as appenders, layouts, etc.).
449
-	 * 
450
-	 * For example, if options are:
451
-	 * <code>
452
-	 * array(
453
-	 * 	'file' => '/tmp/myfile.log',
454
-	 * 	'append' => true
455
-	 * )
456
-	 * </code>
457
-	 * 
458
-	 * This method will call:
459
-	 * <code>
460
-	 * $object->setFile('/tmp/myfile.log')
461
-	 * $object->setAppend(true)
462
-	 * </code>
463
-	 * 
464
-	 * If required setters do not exist, it will produce a warning. 
465
-	 * 
466
-	 * @param mixed $object The object to configure.
467
-	 * @param unknown_type $options
468
-	 */
469
-	private function setOptions($object, $options) {
470
-		foreach($options as $name => $value) {
471
-			$setter = "set$name";
472
-			if (method_exists($object, $setter)) {
473
-				$object->$setter($value);
474
-			} else {
475
-				$class = get_class($object);
476
-				$this->warn("Nonexistant option [$name] specified on [$class]. Skipping.");
477
-			}
478
-		}
479
-	}
446
+    /**
447
+     * Helper method which applies given options to an object which has setters
448
+     * for these options (such as appenders, layouts, etc.).
449
+     * 
450
+     * For example, if options are:
451
+     * <code>
452
+     * array(
453
+     * 	'file' => '/tmp/myfile.log',
454
+     * 	'append' => true
455
+     * )
456
+     * </code>
457
+     * 
458
+     * This method will call:
459
+     * <code>
460
+     * $object->setFile('/tmp/myfile.log')
461
+     * $object->setAppend(true)
462
+     * </code>
463
+     * 
464
+     * If required setters do not exist, it will produce a warning. 
465
+     * 
466
+     * @param mixed $object The object to configure.
467
+     * @param unknown_type $options
468
+     */
469
+    private function setOptions($object, $options) {
470
+        foreach($options as $name => $value) {
471
+            $setter = "set$name";
472
+            if (method_exists($object, $setter)) {
473
+                $object->$setter($value);
474
+            } else {
475
+                $class = get_class($object);
476
+                $this->warn("Nonexistant option [$name] specified on [$class]. Skipping.");
477
+            }
478
+        }
479
+    }
480 480
 	
481
-	/** Helper method to simplify error reporting. */
482
-	private function warn($message) {
483
-		trigger_error("log4php: $message", E_USER_WARNING);
484
-	}
481
+    /** Helper method to simplify error reporting. */
482
+    private function warn($message) {
483
+        trigger_error("log4php: $message", E_USER_WARNING);
484
+    }
485 485
 }
486 486
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 		$info = pathinfo($url);
168 168
 		$ext = strtolower($info['extension']);
169 169
 		
170
-		switch($ext) {
170
+		switch ($ext) {
171 171
 			case 'xml':
172 172
 				return self::FORMAT_XML;
173 173
 			
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 		
202 202
 		// Configure appenders and add them to the appender pool
203 203
 		if (isset($config['appenders']) && is_array($config['appenders'])) {
204
-			foreach($config['appenders'] as $name => $appenderConfig) {
204
+			foreach ($config['appenders'] as $name => $appenderConfig) {
205 205
 				$this->configureAppender($name, $appenderConfig);
206 206
 			}
207 207
 		}
@@ -213,14 +213,14 @@  discard block
 block discarded – undo
213 213
 		
214 214
 		// Configure loggers
215 215
 		if (isset($config['loggers']) && is_array($config['loggers'])) {
216
-			foreach($config['loggers'] as $loggerName => $loggerConfig) {
216
+			foreach ($config['loggers'] as $loggerName => $loggerConfig) {
217 217
 				$this->configureOtherLogger($hierarchy, $loggerName, $loggerConfig);
218 218
 			}
219 219
 		}
220 220
 
221 221
 		// Configure renderers
222 222
 		if (isset($config['renderers']) && is_array($config['renderers'])) {
223
-			foreach($config['renderers'] as $rendererConfig) {
223
+			foreach ($config['renderers'] as $rendererConfig) {
224 224
 				$this->configureRenderer($hierarchy, $rendererConfig);
225 225
 			}
226 226
 		}
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 		
309 309
 		// Parse filters
310 310
 		if (isset($config['filters']) && is_array($config['filters'])) {
311
-			foreach($config['filters'] as $filterConfig) {
311
+			foreach ($config['filters'] as $filterConfig) {
312 312
 				$this->createAppenderFilter($appender, $filterConfig);
313 313
 			}
314 314
 		}
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
 		
424 424
 		// Link appenders to logger
425 425
 		if (isset($config['appenders'])) {
426
-			foreach($config['appenders'] as $appenderName) {
426
+			foreach ($config['appenders'] as $appenderName) {
427 427
 				if (isset($this->appenders[$appenderName])) {
428 428
 					$logger->addAppender($this->appenders[$appenderName]);
429 429
 				} else {
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
 	 * @param unknown_type $options
468 468
 	 */
469 469
 	private function setOptions($object, $options) {
470
-		foreach($options as $name => $value) {
470
+		foreach ($options as $name => $value) {
471 471
 			$setter = "set$name";
472 472
 			if (method_exists($object, $setter)) {
473 473
 				$object->$setter($value);
Please login to merge, or discard this patch.
lib/Payone/Log4php/LoggerFilterLevelMatch.php 3 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,6 @@
 block discarded – undo
67 67
 	}
68 68
 	
69 69
 	/**
70
-	 * @param string $l the level to match
71 70
 	 */
72 71
 	public function setLevelToMatch($level) {
73 72
 		$this->setLevel('levelToMatch', $level);
Please login to merge, or discard this patch.
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -47,54 +47,54 @@
 block discarded – undo
47 47
  */
48 48
 class Payone_Log4php_LoggerFilterLevelMatch extends Payone_Log4php_LoggerFilter {
49 49
   
50
-	/** 
51
-	 * Indicates if this event should be accepted or denied on match
52
-	 * @var boolean
53
-	 */
54
-	protected $acceptOnMatch = true;
50
+    /** 
51
+     * Indicates if this event should be accepted or denied on match
52
+     * @var boolean
53
+     */
54
+    protected $acceptOnMatch = true;
55 55
 
56
-	/**
57
-	 * The level, when to match
58
-	 * @var Payone_Log4php_LoggerLevel
59
-	 */
60
-	protected $levelToMatch;
56
+    /**
57
+     * The level, when to match
58
+     * @var Payone_Log4php_LoggerLevel
59
+     */
60
+    protected $levelToMatch;
61 61
   
62
-	/**
63
-	 * @param boolean $acceptOnMatch
64
-	 */
65
-	public function setAcceptOnMatch($acceptOnMatch) {
66
-		$this->setBoolean('acceptOnMatch', $acceptOnMatch);
67
-	}
62
+    /**
63
+     * @param boolean $acceptOnMatch
64
+     */
65
+    public function setAcceptOnMatch($acceptOnMatch) {
66
+        $this->setBoolean('acceptOnMatch', $acceptOnMatch);
67
+    }
68 68
 	
69
-	/**
70
-	 * @param string $l the level to match
71
-	 */
72
-	public function setLevelToMatch($level) {
73
-		$this->setLevel('levelToMatch', $level);
74
-	}
69
+    /**
70
+     * @param string $l the level to match
71
+     */
72
+    public function setLevelToMatch($level) {
73
+        $this->setLevel('levelToMatch', $level);
74
+    }
75 75
 
76
-	/**
77
-	 * Return the decision of this filter.
78
-	 * 
79
-	 * Returns {@link LoggerFilter::NEUTRAL} if the <b><var>LevelToMatch</var></b>
80
-	 * option is not set or if there is not match.	Otherwise, if there is a
81
-	 * match, then the returned decision is {@link LoggerFilter::ACCEPT} if the
82
-	 * <b><var>AcceptOnMatch</var></b> property is set to <i>true</i>. The
83
-	 * returned decision is {@link LoggerFilter::DENY} if the
84
-	 * <b><var>AcceptOnMatch</var></b> property is set to <i>false</i>.
85
-	 *
86
-	 * @param Payone_Log4php_LoggerLoggingEvent $event
87
-	 * @return integer
88
-	 */
89
-	public function decide(Payone_Log4php_LoggerLoggingEvent $event) {
90
-		if($this->levelToMatch === null) {
91
-			return Payone_Log4php_LoggerFilter::NEUTRAL;
92
-		}
76
+    /**
77
+     * Return the decision of this filter.
78
+     * 
79
+     * Returns {@link LoggerFilter::NEUTRAL} if the <b><var>LevelToMatch</var></b>
80
+     * option is not set or if there is not match.	Otherwise, if there is a
81
+     * match, then the returned decision is {@link LoggerFilter::ACCEPT} if the
82
+     * <b><var>AcceptOnMatch</var></b> property is set to <i>true</i>. The
83
+     * returned decision is {@link LoggerFilter::DENY} if the
84
+     * <b><var>AcceptOnMatch</var></b> property is set to <i>false</i>.
85
+     *
86
+     * @param Payone_Log4php_LoggerLoggingEvent $event
87
+     * @return integer
88
+     */
89
+    public function decide(Payone_Log4php_LoggerLoggingEvent $event) {
90
+        if($this->levelToMatch === null) {
91
+            return Payone_Log4php_LoggerFilter::NEUTRAL;
92
+        }
93 93
 		
94
-		if($this->levelToMatch->equals($event->getLevel())) {	
95
-			return $this->acceptOnMatch ? Payone_Log4php_LoggerFilter::ACCEPT : Payone_Log4php_LoggerFilter::DENY;
96
-		} else {
97
-			return Payone_Log4php_LoggerFilter::NEUTRAL;
98
-		}
99
-	}
94
+        if($this->levelToMatch->equals($event->getLevel())) {	
95
+            return $this->acceptOnMatch ? Payone_Log4php_LoggerFilter::ACCEPT : Payone_Log4php_LoggerFilter::DENY;
96
+        } else {
97
+            return Payone_Log4php_LoggerFilter::NEUTRAL;
98
+        }
99
+    }
100 100
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,11 +87,11 @@
 block discarded – undo
87 87
 	 * @return integer
88 88
 	 */
89 89
 	public function decide(Payone_Log4php_LoggerLoggingEvent $event) {
90
-		if($this->levelToMatch === null) {
90
+		if ($this->levelToMatch === null) {
91 91
 			return Payone_Log4php_LoggerFilter::NEUTRAL;
92 92
 		}
93 93
 		
94
-		if($this->levelToMatch->equals($event->getLevel())) {	
94
+		if ($this->levelToMatch->equals($event->getLevel())) {	
95 95
 			return $this->acceptOnMatch ? Payone_Log4php_LoggerFilter::ACCEPT : Payone_Log4php_LoggerFilter::DENY;
96 96
 		} else {
97 97
 			return Payone_Log4php_LoggerFilter::NEUTRAL;
Please login to merge, or discard this patch.