diff --git a/src/Decode.php b/src/Decode.php index 13afa7a..7c4ae0d 100644 --- a/src/Decode.php +++ b/src/Decode.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Mime */ @@ -101,7 +101,7 @@ public static function splitMessageStruct($message, $boundary, $EOL = Mime::LINE * @param Headers $headers output param, headers container * @param string $body output param, content of message * @param string $EOL EOL string; defaults to {@link Zend_Mime::LINEEND} - * @param boolean $strict enable strict mode for parsing message + * @param bool $strict enable strict mode for parsing message * @return null */ public static function splitMessage($message, &$headers, &$body, $EOL = Mime::LINEEND, $strict = false) diff --git a/src/Exception/ExceptionInterface.php b/src/Exception/ExceptionInterface.php index fbb812a..6ce1def 100644 --- a/src/Exception/ExceptionInterface.php +++ b/src/Exception/ExceptionInterface.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Mime */ diff --git a/src/Exception/RuntimeException.php b/src/Exception/RuntimeException.php index 5cb6c10..be98e8e 100644 --- a/src/Exception/RuntimeException.php +++ b/src/Exception/RuntimeException.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Mime */ diff --git a/src/Message.php b/src/Message.php index 65d733c..80ce28f 100644 --- a/src/Message.php +++ b/src/Message.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Mime */ @@ -57,7 +57,7 @@ public function addPart(Part $part) * Check if message needs to be sent as multipart * MIME message or if it has only one part. * - * @return boolean + * @return bool */ public function isMultiPart() { @@ -225,7 +225,7 @@ public static function createFromMessage($message, $boundary, $EOL = Mime::LINEE { $parts = Decode::splitMessageStruct($message, $boundary, $EOL); - $res = new self(); + $res = new static(); foreach ($parts as $part) { // now we build a new MimePart for the current Message Part: $newPart = new Part($part['body']); diff --git a/src/Mime.php b/src/Mime.php index 6f4e0cd..2e6b671 100644 --- a/src/Mime.php +++ b/src/Mime.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Mime */ @@ -95,7 +95,7 @@ class Mime * false, encode the string for secure delivery. * * @param string $str - * @return boolean + * @return bool */ public static function isPrintable($str) { diff --git a/src/Part.php b/src/Part.php index a3f01f5..d4fd6e2 100644 --- a/src/Part.php +++ b/src/Part.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Mime */ @@ -73,7 +73,7 @@ public function isStream() * @return stream * @throws Exception\RuntimeException if not a stream or unable to append filter */ - public function getEncodedStream() + public function getEncodedStream($EOL = Mime::LINEEND) { if (!$this->isStream) { throw new Exception\RuntimeException('Attempt to get a stream from a string part'); @@ -88,7 +88,7 @@ public function getEncodedStream() STREAM_FILTER_READ, array( 'line-length' => 76, - 'line-break-chars' => Mime::LINEEND + 'line-break-chars' => $EOL ) ); if (!is_resource($filter)) { @@ -102,7 +102,7 @@ public function getEncodedStream() STREAM_FILTER_READ, array( 'line-length' => 76, - 'line-break-chars' => Mime::LINEEND + 'line-break-chars' => $EOL ) ); if (!is_resource($filter)) { @@ -123,7 +123,7 @@ public function getEncodedStream() public function getContent($EOL = Mime::LINEEND) { if ($this->isStream) { - return stream_get_contents($this->getEncodedStream()); + return stream_get_contents($this->getEncodedStream($EOL)); } return Mime::encode($this->content, $this->encoding, $EOL); } diff --git a/test/MessageTest.php b/test/MessageTest.php index 769834c..c3102b0 100644 --- a/test/MessageTest.php +++ b/test/MessageTest.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Mime */ diff --git a/test/MimeTest.php b/test/MimeTest.php index 6360aaf..a108cec 100644 --- a/test/MimeTest.php +++ b/test/MimeTest.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Mime */ diff --git a/test/PartTest.php b/test/PartTest.php index fddb261..13f1db8 100644 --- a/test/PartTest.php +++ b/test/PartTest.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Mime */