Skip to content

Commit

Permalink
Simplify a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Dec 31, 2014
1 parent da90c32 commit 7b235ba
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions framework/Compress/lib/Horde/Compress/Tnef/Rtf.php
Expand Up @@ -226,23 +226,21 @@ protected function _rtf2text($text)
// since we reach the end of the control word.
if ($nextCharacter >= 'a' && $nextCharacter <= 'z'
|| $nextCharacter >= 'A' && $nextCharacter <= 'Z') {
if (empty($param)) {
$word .= $nextCharacter;
} else {
if (!empty($param)) {
break;
}
$word .= $nextCharacter;
} elseif ($nextCharacter >= '0' && $nextCharacter <= '9') {
// If it is a digit, store the parameter.
$param .= $nextCharacter;
} elseif ($nextCharacter == '-') {
// Since minus sign may occur only before a digit
// parameter, check whether $param is empty.
// Otherwise, we reach the end of the control word.
if (empty($param)) {
$param .= $nextCharacter;
} else {
if (!empty($param)) {
break;
}
$param .= $nextCharacter;
} else {
break;
}
Expand Down

0 comments on commit 7b235ba

Please sign in to comment.