diff --git a/library/Msd/Form/Decorator/Default.php b/library/Msd/Form/Decorator/Default.php
index d751958..f2f629c 100644
--- a/library/Msd/Form/Decorator/Default.php
+++ b/library/Msd/Form/Decorator/Default.php
@@ -53,9 +53,9 @@ class Msd_Form_Decorator_Default extends Msd_Form_Decorator_Abstract
$separator = $this->getSeparator();
$placement = $this->getPlacement();
switch ($placement) {
- case (self::PREPEND):
+ case self::PREPEND:
return $output . $separator . $content;
- case (self::APPEND):
+ case self::APPEND:
default:
return $content . $separator . $output;
}
diff --git a/library/Msd/Form/Decorator/DisplayGroup.php b/library/Msd/Form/Decorator/DisplayGroup.php
index 04536e9..08ea8c2 100644
--- a/library/Msd/Form/Decorator/DisplayGroup.php
+++ b/library/Msd/Form/Decorator/DisplayGroup.php
@@ -56,9 +56,9 @@ class Msd_Form_Decorator_DisplayGroup extends Msd_Form_Decorator_Abstract
$placement = $this->getPlacement();
$separator = $this->getSeparator();
switch ($placement) {
- case (self::PREPEND):
+ case self::PREPEND:
return $sElements . $separator . $content;
- case (self::APPEND):
+ case self::APPEND:
default:
return $content . $separator . $sElements;
}
diff --git a/library/Msd/Form/Decorator/DoubleLabel.php b/library/Msd/Form/Decorator/DoubleLabel.php
index 54d4625..3661142 100644
--- a/library/Msd/Form/Decorator/DoubleLabel.php
+++ b/library/Msd/Form/Decorator/DoubleLabel.php
@@ -85,9 +85,9 @@ class Msd_Form_Decorator_DoubleLabel extends Msd_Form_Decorator_Abstract
';
$output = sprintf($output, $label, $input, $secondLabel);
switch ($placement) {
- case (self::PREPEND):
+ case self::PREPEND:
return $output . $separator . $content;
- case (self::APPEND):
+ case self::APPEND:
default:
return $content . $separator . $output;
}
diff --git a/library/Msd/Form/Decorator/LineEnd.php b/library/Msd/Form/Decorator/LineEnd.php
index 6053681..f2eb215 100644
--- a/library/Msd/Form/Decorator/LineEnd.php
+++ b/library/Msd/Form/Decorator/LineEnd.php
@@ -33,9 +33,9 @@ class Msd_Form_Decorator_LineEnd extends Msd_Form_Decorator_Abstract
$separator = $this->getSeparator();
$placement = $this->getPlacement();
switch ($placement) {
- case (self::PREPEND):
+ case self::PREPEND:
return $output . $separator . $content;
- case (self::APPEND):
+ case self::APPEND:
default:
return $content . $separator . $output;
}
diff --git a/library/Msd/Form/Decorator/LineMiddle.php b/library/Msd/Form/Decorator/LineMiddle.php
index 5df551d..cf97ad7 100644
--- a/library/Msd/Form/Decorator/LineMiddle.php
+++ b/library/Msd/Form/Decorator/LineMiddle.php
@@ -34,9 +34,9 @@ class Msd_Form_Decorator_LineMiddle extends Msd_Form_Decorator_Abstract
$separator = $this->getSeparator();
$placement = $this->getPlacement();
switch ($placement) {
- case (self::PREPEND):
+ case self::PREPEND:
return $output . $separator . $content;
- case (self::APPEND):
+ case self::APPEND:
default:
return $content . $separator . $output;
}
diff --git a/library/Msd/Form/Decorator/LineStart.php b/library/Msd/Form/Decorator/LineStart.php
index 17f9597..ae4d797 100644
--- a/library/Msd/Form/Decorator/LineStart.php
+++ b/library/Msd/Form/Decorator/LineStart.php
@@ -38,9 +38,9 @@ class Msd_Form_Decorator_LineStart extends Msd_Form_Decorator_Abstract
$input = $this->buildInput();
$output = '
' . $label . ' | ' . '' . $input;
switch ($placement) {
- case (self::PREPEND):
+ case self::PREPEND:
return $output . $separator . $content;
- case (self::APPEND):
+ case self::APPEND:
default:
return $content . $separator . $output;
}
diff --git a/library/Msd/Form/Decorator/SubForm.php b/library/Msd/Form/Decorator/SubForm.php
index 3ec6d8a..77918ed 100644
--- a/library/Msd/Form/Decorator/SubForm.php
+++ b/library/Msd/Form/Decorator/SubForm.php
@@ -43,9 +43,9 @@ class Msd_Form_Decorator_SubForm extends Msd_Form_Decorator_Abstract
$separator = $this->getSeparator();
$placement = $this->getPlacement();
switch ($placement) {
- case (self::PREPEND):
+ case self::PREPEND:
return $htmlOutput . $separator . $content;
- case (self::APPEND):
+ case self::APPEND:
default:
return $content . $separator . $htmlOutput;
}
diff --git a/library/Msd/Log.php b/library/Msd/Log.php
index ffd9f2d..ec0480e 100644
--- a/library/Msd/Log.php
+++ b/library/Msd/Log.php
@@ -17,10 +17,10 @@
class Msd_Log
{
// Define constants
- const PHP = 'PHP-Log';
- const PERL = 'PERL-Log';
+ const PHP = 'PHP-Log';
+ const PERL = 'PERL-Log';
const PERL_COMPLETE = 'PERL-Complete-Log';
- const ERROR = 'Error-Log';
+ const ERROR = 'Error-Log';
// Define static Instance
private static $_instance = NULL;
@@ -34,15 +34,14 @@ class Msd_Log
public function __construct()
{
// define instance handler
- $this->handle = array();
- $this->handle[self::PHP] = false;
- $this->handle[self::PERL] = false;
+ $this->handle = array();
+ $this->handle[self::PHP] = false;
+ $this->handle[self::PERL] = false;
$this->handle[self::PERL_COMPLETE] = false;
- $this->handle[self::ERROR] = false;
+ $this->handle[self::ERROR] = false;
- // get config
- $config = Msd_Registry::getConfig();
- $this->_paths = (object) $config->getParam('paths');
+ $config = Msd_Registry::getConfig();
+ $this->_paths = (object)$config->getParam('paths');
}
/**
@@ -73,7 +72,7 @@ class Msd_Log
*/
private function _close($file)
{
- $filename = $this->getFile($file);
+ $filename = $this->getFile($file);
$extension = pathinfo($filename, PATHINFO_EXTENSION);
if ($extension == 'gz') {
gzclose($this->handle[$file]);
@@ -108,9 +107,9 @@ class Msd_Log
public function getLogInstance($type)
{
if (!isset($this->_logInstance[$type])) {
- $writer = new Zend_Log_Writer_Stream($this->getFile($type));
+ $writer = new Zend_Log_Writer_Stream($this->getFile($type));
$formatter =
- new Zend_Log_Formatter_Simple("%timestamp% %message%\n");
+ new Zend_Log_Formatter_Simple("%timestamp% %message%\n");
$writer->setFormatter($formatter);
$this->_logInstance[$type] = new Zend_Log($writer);
}
@@ -129,7 +128,7 @@ class Msd_Log
{
// @todo if log_maxsize reached => archive/delete log
$logger = self::getInstance();
- $log = $logger->getLogInstance($type);
+ $log = $logger->getLogInstance($type);
return $log->info($message);
}
@@ -162,7 +161,7 @@ class Msd_Log
/**
* Delete a log file and recreate it.
*
- * @param string $file Filename
+ * @param string $type Filename
*
* @return void
*/
@@ -174,30 +173,31 @@ class Msd_Log
$translator = Msd_Language::getInstance()->getTranslator();
$this->write($type, $translator->_('L_LOG_CREATED'));
}
+
/**
* Read a logfile and return content as array.
*
* If $revers is set to true the ordering of lines is reversed.
*
- * @param parent::const $type The type of logfile to read
- * @param boolean $reverse Wether to place latest entries first
+ * @param string $type The type of logfile to read
+ * @param bool $reverse Whether to place latest entries first
*
- * @return array Log data from file as array
+ * @return array Log data from file as array
*/
public function read($type = self::PHP, $reverse = false)
{
$filename = $this->getFile($type);
if (!is_readable($filename)) {
$timestamp = Zend_Date::ISO_8601;
- $lang = Msd_Language::getInstance()->getTranslator();
- $msg = $timestamp . ' ' .
+ $lang = Msd_Language::getInstance()->getTranslator();
+ $msg = $timestamp . ' ' .
sprintf($lang->_('L_LOG_NOT_READABLE'), $filename) . '';
return array($msg);
} else {
$output = file($filename);
}
if ($reverse == 1) {
- $output = array_reverse($output);
+ $output = array_reverse($output);
}
return $output;
|