diff --git a/src/Mustache/Cache/FilesystemCache.php b/src/Mustache/Cache/FilesystemCache.php index 530bd63..3e742b7 100644 --- a/src/Mustache/Cache/FilesystemCache.php +++ b/src/Mustache/Cache/FilesystemCache.php @@ -108,9 +108,11 @@ class Mustache_Cache_FilesystemCache extends Mustache_Cache_AbstractCache ); @mkdir($dirName, 0777, true); + // @codeCoverageIgnoreStart if (!is_dir($dirName)) { throw new Mustache_Exception_RuntimeException(sprintf('Failed to create cache directory "%s".', $dirName)); } + // @codeCoverageIgnoreEnd } return $dirName; @@ -143,13 +145,17 @@ class Mustache_Cache_FilesystemCache extends Mustache_Cache_AbstractCache return; } + // @codeCoverageIgnoreStart $this->log( Mustache_Logger::ERROR, 'Unable to rename Mustache temp cache file: "{tempName}" -> "{fileName}"', array('tempName' => $tempFile, 'fileName' => $fileName) ); + // @codeCoverageIgnoreEnd } + // @codeCoverageIgnoreStart throw new Mustache_Exception_RuntimeException(sprintf('Failed to write cache file "%s".', $fileName)); + // @codeCoverageIgnoreEnd } } diff --git a/src/Mustache/Exception/SyntaxException.php b/src/Mustache/Exception/SyntaxException.php index bfc16cf..b1879a3 100644 --- a/src/Mustache/Exception/SyntaxException.php +++ b/src/Mustache/Exception/SyntaxException.php @@ -27,7 +27,7 @@ class Mustache_Exception_SyntaxException extends LogicException implements Musta if (version_compare(PHP_VERSION, '5.3.0', '>=')) { parent::__construct($msg, 0, $previous); } else { - parent::__construct($msg); + parent::__construct($msg); // @codeCoverageIgnore } } diff --git a/src/Mustache/Exception/UnknownFilterException.php b/src/Mustache/Exception/UnknownFilterException.php index 9449f98..0651c17 100644 --- a/src/Mustache/Exception/UnknownFilterException.php +++ b/src/Mustache/Exception/UnknownFilterException.php @@ -27,7 +27,7 @@ class Mustache_Exception_UnknownFilterException extends UnexpectedValueException if (version_compare(PHP_VERSION, '5.3.0', '>=')) { parent::__construct($message, 0, $previous); } else { - parent::__construct($message); + parent::__construct($message); // @codeCoverageIgnore } } diff --git a/src/Mustache/Exception/UnknownHelperException.php b/src/Mustache/Exception/UnknownHelperException.php index ce75e5a..193be78 100644 --- a/src/Mustache/Exception/UnknownHelperException.php +++ b/src/Mustache/Exception/UnknownHelperException.php @@ -27,7 +27,7 @@ class Mustache_Exception_UnknownHelperException extends InvalidArgumentException if (version_compare(PHP_VERSION, '5.3.0', '>=')) { parent::__construct($message, 0, $previous); } else { - parent::__construct($message); + parent::__construct($message); // @codeCoverageIgnore } } diff --git a/src/Mustache/Exception/UnknownTemplateException.php b/src/Mustache/Exception/UnknownTemplateException.php index 79a3ea5..32a778a 100644 --- a/src/Mustache/Exception/UnknownTemplateException.php +++ b/src/Mustache/Exception/UnknownTemplateException.php @@ -27,7 +27,7 @@ class Mustache_Exception_UnknownTemplateException extends InvalidArgumentExcepti if (version_compare(PHP_VERSION, '5.3.0', '>=')) { parent::__construct($message, 0, $previous); } else { - parent::__construct($message); + parent::__construct($message); // @codeCoverageIgnore } } diff --git a/src/Mustache/Tokenizer.php b/src/Mustache/Tokenizer.php index f9e5d50..b1f3d73 100644 --- a/src/Mustache/Tokenizer.php +++ b/src/Mustache/Tokenizer.php @@ -91,11 +91,14 @@ class Mustache_Tokenizer { // Setting mbstring.func_overload makes things *really* slow. // Let's do everyone a favor and scan this string as ASCII instead. + // + // @codeCoverageIgnoreStart $encoding = null; if (function_exists('mb_internal_encoding') && ini_get('mbstring.func_overload') & 2) { $encoding = mb_internal_encoding(); mb_internal_encoding('ASCII'); } + // @codeCoverageIgnoreEnd $this->reset(); @@ -202,9 +205,11 @@ class Mustache_Tokenizer $this->flushBuffer(); // Restore the user's encoding... + // @codeCoverageIgnoreStart if ($encoding) { mb_internal_encoding($encoding); } + // @codeCoverageIgnoreEnd return $this->tokens; }