@@ -12,8 +12,7 @@ |
||
| 12 | 12 | { |
| 13 | 13 | $a =substr($hexstr,$i,2); |
| 14 | 14 | $c = pack("H*",$a); |
| 15 | - if ($i==0){$sbin=$c;} |
|
| 16 | - else {$sbin.=$c;} |
|
| 15 | + if ($i==0){$sbin=$c;} else {$sbin.=$c;} |
|
| 17 | 16 | $i+=2; |
| 18 | 17 | } |
| 19 | 18 | return $sbin; |
@@ -30,7 +30,9 @@ |
||
| 30 | 30 | ); |
| 31 | 31 | |
| 32 | 32 | public static function get($fore, $back) { |
| 33 | - if (!isset(self::$_map[$back][$fore])) return '08'; |
|
| 33 | + if (!isset(self::$_map[$back][$fore])) { |
|
| 34 | + return '08'; |
|
| 35 | + } |
|
| 34 | 36 | return self::$_map[$back][$fore]; |
| 35 | 37 | } |
| 36 | 38 | } |
| 37 | 39 | \ No newline at end of file |
@@ -63,12 +63,16 @@ |
||
| 63 | 63 | |
| 64 | 64 | foreach ($this->_params as $key => $param) { |
| 65 | 65 | $p = $param['param']; |
| 66 | - if (!$p->bound()) continue; |
|
| 66 | + if (!$p->bound()) { |
|
| 67 | + continue; |
|
| 68 | + } |
|
| 67 | 69 | $this->_text = substr_replace($this->_text, $p->value(), $param['offset'], strlen($p->value())); |
| 68 | 70 | } |
| 69 | 71 | // apply colours |
| 70 | 72 | foreach (str_split($this->_text) as $key => $char) { |
| 71 | - if ($length++ > $this->_length) break; |
|
| 73 | + if ($length++ > $this->_length) { |
|
| 74 | + break; |
|
| 75 | + } |
|
| 72 | 76 | $fore = $this->_getColour($key); |
| 73 | 77 | $output .= $this->_char($char, $fore); |
| 74 | 78 | } |