From 5b5180f661cdca2af4c267256f999889ded99bc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Dewitte?= Date: Fri, 8 Mar 2013 09:32:46 +0100 Subject: [PATCH] code style in FileLog and FileLogTest --- lib/Cake/Log/Engine/FileLog.php | 3 ++- lib/Cake/Test/Case/Log/Engine/FileLogTest.php | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/Cake/Log/Engine/FileLog.php b/lib/Cake/Log/Engine/FileLog.php index cf866181f..0e86de548 100644 --- a/lib/Cake/Log/Engine/FileLog.php +++ b/lib/Cake/Log/Engine/FileLog.php @@ -145,11 +145,12 @@ class FileLog extends BaseLog { static $selfError = false; if (!$selfError && !$exists && !chmod($pathname, (int)$this->_config['mask'])) { $selfError = true; - trigger_error(__d( + trigger_error(__d( 'cake_dev', 'Could not apply permission mask "%s" on log file "%s"', array($pathname, $this->_config['mask'])), E_USER_WARNING); $selfError = false; } + return $r; } /** diff --git a/lib/Cake/Test/Case/Log/Engine/FileLogTest.php b/lib/Cake/Test/Case/Log/Engine/FileLogTest.php index 12b6d4350..50212789d 100644 --- a/lib/Cake/Test/Case/Log/Engine/FileLogTest.php +++ b/lib/Cake/Test/Case/Log/Engine/FileLogTest.php @@ -158,21 +158,21 @@ class FileLogTest extends CakeTestCase { $log = new FileLog(array('path' => $path, 'mask' => 0666)); $log->write('warning', 'Test warning one'); - $result = substr(sprintf('%o',fileperms($path . 'error.log')), -4); + $result = substr(sprintf('%o', fileperms($path . 'error.log')), -4); $expected = '0666'; $this->assertEquals($expected, $result); unlink($path . 'error.log'); $log = new FileLog(array('path' => $path, 'mask' => 0644)); $log->write('warning', 'Test warning two'); - $result = substr(sprintf('%o',fileperms($path . 'error.log')), -4); + $result = substr(sprintf('%o', fileperms($path . 'error.log')), -4); $expected = '0644'; $this->assertEquals($expected, $result); unlink($path . 'error.log'); $log = new FileLog(array('path' => $path, 'mask' => 0640)); $log->write('warning', 'Test warning three'); - $result = substr(sprintf('%o',fileperms($path . 'error.log')), -4); + $result = substr(sprintf('%o', fileperms($path . 'error.log')), -4); $expected = '0640'; $this->assertEquals($expected, $result); unlink($path . 'error.log');