Browse Source

Fix coding standard errors in Log/

mark_story 14 years ago
parent
commit
dc2f6efe13
3 changed files with 19 additions and 15 deletions
  1. 14 13
      lib/Cake/Log/CakeLog.php
  2. 3 1
      lib/Cake/Log/CakeLogInterface.php
  3. 2 1
      lib/Cake/Log/Engine/FileLog.php

+ 14 - 13
lib/Cake/Log/CakeLog.php

@@ -18,24 +18,24 @@
  * @since         CakePHP(tm) v 0.2.9
  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
  */
+
 /**
  * Set up error level constants to be used within the framework if they are not defined within the
  * system.
  *
  */
-	if (!defined('LOG_WARNING')) {
-		define('LOG_WARNING', 3);
-	}
-	if (!defined('LOG_NOTICE')) {
-		define('LOG_NOTICE', 4);
-	}
-	if (!defined('LOG_DEBUG')) {
-		define('LOG_DEBUG', 5);
-	}
-	if (!defined('LOG_INFO')) {
-		define('LOG_INFO', 6);
-	}
-
+if (!defined('LOG_WARNING')) {
+	define('LOG_WARNING', 3);
+}
+if (!defined('LOG_NOTICE')) {
+	define('LOG_NOTICE', 4);
+}
+if (!defined('LOG_DEBUG')) {
+	define('LOG_DEBUG', 5);
+}
+if (!defined('LOG_INFO')) {
+	define('LOG_INFO', 6);
+}
 
 /**
  * Logs messages to configured Log adapters.  One or more adapters can be configured
@@ -205,4 +205,5 @@ class CakeLog {
 		}
 		return true;
 	}
+
 }

+ 3 - 1
lib/Cake/Log/CakeLogInterface.php

@@ -24,6 +24,7 @@
  * @package       Cake.Log
  */
 interface CakeLogInterface {
+
 /**
  * Write method to handle writes being made to the Logger
  *
@@ -32,4 +33,5 @@ interface CakeLogInterface {
  * @return void
  */
 	public function write($type, $message);
-}
+
+}

+ 2 - 1
lib/Cake/Log/Engine/FileLog.php

@@ -59,7 +59,7 @@ class FileLog implements CakeLogInterface {
 		$debugTypes = array('notice', 'info', 'debug');
 
 		if ($type == 'error' || $type == 'warning') {
-			$filename = $this->_path  . 'error.log';
+			$filename = $this->_path . 'error.log';
 		} elseif (in_array($type, $debugTypes)) {
 			$filename = $this->_path . 'debug.log';
 		} else {
@@ -68,4 +68,5 @@ class FileLog implements CakeLogInterface {
 		$output = date('Y-m-d H:i:s') . ' ' . ucfirst($type) . ': ' . $message . "\n";
 		return file_put_contents($filename, $output, FILE_APPEND);
 	}
+
 }