Scrutinizer Auto-Fixes

This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
This commit is contained in:
Scrutinizer Auto-Fixer 2016-03-28 15:13:36 +00:00
parent bde9db585e
commit c40a8ed0a2
17 changed files with 99 additions and 99 deletions

View File

@ -46,7 +46,7 @@ class Fibunacci
$old_2 = $start; $old_2 = $start;
$fib = 0; $fib = 0;
for($i = 4; $i < $n; $i++) { for ($i = 4; $i < $n; $i++) {
$fib = $old_1 + $old_2; $fib = $old_1 + $old_2;
$old_1 = $old_2; $old_1 = $old_2;
$old_2 = $fib; $old_2 = $fib;

View File

@ -334,14 +334,14 @@ class Matrix implements ArrayAccess, Iterator
public function det() public function det()
{ {
if($this->n === 1) { if ($this->n === 1) {
return $this->matrix[0][0]; return $this->matrix[0][0];
} }
$trianglize = $this->matrix; $trianglize = $this->matrix;
$prod = $this->upperTrianglize($trianglize); $prod = $this->upperTrianglize($trianglize);
for($i = 0; $i < $this->n; $i++) { for ($i = 0; $i < $this->n; $i++) {
$prod *= $trianglize[$i][$i]; $prod *= $trianglize[$i][$i];
} }

View File

@ -43,8 +43,8 @@ class Numbers
{ {
$sum = 0; $sum = 0;
for($i = 1; $i < $n; $i++) { for ($i = 1; $i < $n; $i++) {
if($n % $i == 0) { if ($n % $i == 0) {
$sum += $i; $sum += $i;
} }
} }
@ -89,7 +89,7 @@ class Numbers
$goodMask = 0xC840C04048404040; // 0xC840C04048404040 computed below $goodMask = 0xC840C04048404040; // 0xC840C04048404040 computed below
for ($i = 0; $i < 64; ++$i) { for ($i = 0; $i < 64; ++$i) {
$goodMask |= PHP_INT_MIN >> ($i*$i); $goodMask |= PHP_INT_MIN >> ($i * $i);
} }
// This tests if the 6 least significant bits are right. // This tests if the 6 least significant bits are right.
@ -108,7 +108,7 @@ class Numbers
// Now x is either 0 or odd. // Now x is either 0 or odd.
// In binary each odd square ends with 001. // In binary each odd square ends with 001.
// Postpone the sign test until now; handle zero in the branch. // Postpone the sign test until now; handle zero in the branch.
if (($n&7) != 1 | $n <= 0) { if (($n & 7) != 1 | $n <= 0) {
return $n === 0; return $n === 0;
} }
// Do it in the classical way. // Do it in the classical way.
@ -132,7 +132,7 @@ class Numbers
{ {
$count = 0; $count = 0;
while ($n !== 0) { while ($n !== 0) {
if ($n & 1 == 1) { if ($n & 1 == 1) {
break; break;
} else { } else {
$count++; $count++;
@ -156,10 +156,10 @@ class Numbers
*/ */
public static function greatestCommonDivisor(int $n, int $m) : int public static function greatestCommonDivisor(int $n, int $m) : int
{ {
while(true) { while (true) {
if($n === $m) { if ($n === $m) {
return $m; return $m;
} if($n > $m) { } if ($n > $m) {
$n -= $m; $n -= $m;
} else { } else {
$m -= $n; $m -= $n;

View File

@ -130,12 +130,12 @@ class Directory extends FileAbstract implements \Iterator, \ArrayAccess
*/ */
public static function createPath(string $path, int $permission = 0644, bool $recursive = false) : bool public static function createPath(string $path, int $permission = 0644, bool $recursive = false) : bool
{ {
if($recursive && !file_exists($parent = self::getParent($path))) { if ($recursive && !file_exists($parent = self::getParent($path))) {
self::createPath($parent, $permission, $recursive); self::createPath($parent, $permission, $recursive);
} }
if (!file_exists($path)) { if (!file_exists($path)) {
if(is_writable(self::getParent($path))) { if (is_writable(self::getParent($path))) {
mkdir($path, $permission, true); mkdir($path, $permission, true);
return true; return true;

View File

@ -35,7 +35,7 @@ class C25 extends C128Abstract
* @var string[] * @var string[]
* @since 1.0.0 * @since 1.0.0
*/ */
protected static $CODEARRAY = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0']; protected static $CODEARRAY = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'];
/** /**
* Char weighted array. * Char weighted array.

View File

@ -139,11 +139,11 @@ class Commit
*/ */
private function addChange(string $path, int $line, string $old, string $new) private function addChange(string $path, int $line, string $old, string $new)
{ {
if(!isset($this->files[$path])) { if (!isset($this->files[$path])) {
throw new \Exception(); throw new \Exception();
} }
if(!isset($this->files[$path][$line])) { if (!isset($this->files[$path][$line])) {
$this->files[$path][$line] = ['old' => $old, 'new' => $new]; $this->files[$path][$line] = ['old' => $old, 'new' => $new];
} else { } else {
throw new \Exception(); throw new \Exception();

View File

@ -45,7 +45,7 @@ class Git {
*/ */
public static function setBin(string $path) public static function setBin(string $path)
{ {
if(realpath($path) === false) { if (realpath($path) === false) {
throw new \PathException($path); throw new \PathException($path);
} }

View File

@ -90,7 +90,7 @@ class MultiMap implements \Countable
$id = count($this->values); $id = count($this->values);
$inserted = false; $inserted = false;
if($this->keyType !== KeyType::MULTIPLE) { if ($this->keyType !== KeyType::MULTIPLE) {
$keys = [implode($keys, ':')]; $keys = [implode($keys, ':')];
} }
@ -148,7 +148,7 @@ class MultiMap implements \Countable
*/ */
public function get($key) public function get($key)
{ {
if($this->keyType === KeyType::SINGLE) { if ($this->keyType === KeyType::SINGLE) {
return $this->getSingle($key); return $this->getSingle($key);
} else { } else {
return $this->getMultiple($key); return $this->getMultiple($key);
@ -182,14 +182,14 @@ class MultiMap implements \Countable
*/ */
private function getMultiple($key) private function getMultiple($key)
{ {
if(is_array($key)) { if (is_array($key)) {
if($this->orderType === OrderType::LOOSE) { if ($this->orderType === OrderType::LOOSE) {
$keys = Permutation::permut($key); $keys = Permutation::permut($key);
foreach($keys as $key => $value) { foreach ($keys as $key => $value) {
$key = implode($value, ':'); $key = implode($value, ':');
if(isset($this->keys[$key])) { if (isset($this->keys[$key])) {
return $this->values[$this->keys[$key]]; return $this->values[$this->keys[$key]];
} }
} }
@ -214,7 +214,7 @@ class MultiMap implements \Countable
*/ */
public function set($key, $value) : bool public function set($key, $value) : bool
{ {
if($this->keyType === KeyType::MULTIPLE && is_array($key)) { if ($this->keyType === KeyType::MULTIPLE && is_array($key)) {
return $this->setMultiple($key, $value); return $this->setMultiple($key, $value);
} else { } else {
return $this->setSingle($key, $value); return $this->setSingle($key, $value);
@ -258,11 +258,11 @@ class MultiMap implements \Countable
*/ */
private function setMultiple($key, $value) : bool private function setMultiple($key, $value) : bool
{ {
if($this->orderType !== OrderType::LOOSE) { if ($this->orderType !== OrderType::LOOSE) {
$permutation = Permutation::permut($key); $permutation = Permutation::permut($key);
foreach($permutation as $permut) { foreach ($permutation as $permut) {
if($this->set(implode($permut, ':'), $value)) { if ($this->set(implode($permut, ':'), $value)) {
return true; return true;
} }
} }
@ -285,7 +285,7 @@ class MultiMap implements \Countable
*/ */
public function remove($key) : bool public function remove($key) : bool
{ {
if($this->keyType === KeyType::MULTIPLE && is_array($key)) { if ($this->keyType === KeyType::MULTIPLE && is_array($key)) {
return $this->removeMultiple($key); return $this->removeMultiple($key);
} else { } else {
return $this->removeSingle($key); return $this->removeSingle($key);
@ -329,12 +329,12 @@ class MultiMap implements \Countable
*/ */
private function removeMultiple($key) : bool private function removeMultiple($key) : bool
{ {
if($this->orderType === OrderType::LOOSE) { if ($this->orderType === OrderType::LOOSE) {
$keys = Permutation::permut($key); $keys = Permutation::permut($key);
$removed = false; $removed = false;
foreach($keys as $key => $value) { foreach ($keys as $key => $value) {
$removed |= $this->remove(implode($value, ':')); $removed |= $this->remove(implode($value, ':'));
} }
@ -359,7 +359,7 @@ class MultiMap implements \Countable
*/ */
public function remap($old, $new) : bool public function remap($old, $new) : bool
{ {
if($this->keyType === KeyType::MULTIPLE) { if ($this->keyType === KeyType::MULTIPLE) {
return false; return false;
} }
@ -388,7 +388,7 @@ class MultiMap implements \Countable
*/ */
public function removeKey($key) : bool public function removeKey($key) : bool
{ {
if($this->keyType === KeyType::MULTIPLE && is_array($key)) { if ($this->keyType === KeyType::MULTIPLE && is_array($key)) {
return $this->removeKeyMultiple($key); return $this->removeKeyMultiple($key);
} else { } else {
return $this->removeKeySingle($key); return $this->removeKeySingle($key);
@ -434,12 +434,12 @@ class MultiMap implements \Countable
*/ */
private function removeKeyMultiple($key) : bool private function removeKeyMultiple($key) : bool
{ {
if($this->orderType === OrderType::LOOSE) { if ($this->orderType === OrderType::LOOSE) {
$keys = Permutation::permut($key); $keys = Permutation::permut($key);
$removed = false; $removed = false;
foreach($keys as $key => $value) { foreach ($keys as $key => $value) {
$removed |= $this->removeKey(implode($value, ':')); $removed |= $this->removeKey(implode($value, ':'));
} }
@ -461,7 +461,7 @@ class MultiMap implements \Countable
*/ */
public function getSiblings($key) : array public function getSiblings($key) : array
{ {
if($this->keyType === KeyType::MULTIPLE) { if ($this->keyType === KeyType::MULTIPLE) {
return $this->getSiblingsMultiple($key); return $this->getSiblingsMultiple($key);
} }
@ -506,7 +506,7 @@ class MultiMap implements \Countable
*/ */
public function getSiblingsMultiple($key) : array public function getSiblingsMultiple($key) : array
{ {
if($this->orderType === OrderType::LOOSE) { if ($this->orderType === OrderType::LOOSE) {
return Permutation::permut($key); return Permutation::permut($key);
} else { } else {
return []; return [];

View File

@ -64,11 +64,11 @@ class ArrayParser
$stringify = '[' . PHP_EOL; $stringify = '[' . PHP_EOL;
foreach ($arr as $key => $val) { foreach ($arr as $key => $val) {
if(is_string($key)) { if (is_string($key)) {
$key = '"' . $key . '"'; $key = '"' . $key . '"';
} }
$stringify .= ' ' . $key . ' => ' . MemberParser::parseVariable($val). ',' . PHP_EOL; $stringify .= ' ' . $key . ' => ' . MemberParser::parseVariable($val) . ',' . PHP_EOL;
} }

View File

@ -136,7 +136,7 @@ class ClassParser
public function addUse(string $namespace, string $as = null) public function addUse(string $namespace, string $as = null)
{ {
if(isset($as)) { if (isset($as)) {
$this->use[$as] = $namespace; $this->use[$as] = $namespace;
} else { } else {
$this->use[] = $namespace; $this->use[] = $namespace;
@ -145,7 +145,7 @@ class ClassParser
public function removeUse($id) : bool public function removeUse($id) : bool
{ {
if(isset($this->use[$id])) { if (isset($this->use[$id])) {
unset($this->use[$id]); unset($this->use[$id]);
return true; return true;
@ -186,7 +186,7 @@ class ClassParser
public function addTrait(string $trait, string $as = null) public function addTrait(string $trait, string $as = null)
{ {
if(isset($as)) { if (isset($as)) {
$this->traits[$as] = $trait; $this->traits[$as] = $trait;
} else { } else {
$this->traits[] = $trait; $this->traits[] = $trait;
@ -200,7 +200,7 @@ class ClassParser
public function removeMember(string $name) : bool public function removeMember(string $name) : bool
{ {
if(isset($this->members[$name])) { if (isset($this->members[$name])) {
unset($this->members[$name]); unset($this->members[$name]);
return true; return true;
@ -221,7 +221,7 @@ class ClassParser
public function removeFunction(string $name) : bool public function removeFunction(string $name) : bool
{ {
if(isset($this->functions[$name])) { if (isset($this->functions[$name])) {
unset($this->functions[$name]); unset($this->functions[$name]);
return true; return true;
@ -239,67 +239,67 @@ class ClassParser
{ {
$class = ''; $class = '';
if(!empty($this->requires)) { if (!empty($this->requires)) {
foreach($this->requires as $require) { foreach ($this->requires as $require) {
$class .= 'require_once "' . $require . '";' . PHP_EOL; $class .= 'require_once "' . $require . '";' . PHP_EOL;
} }
$class .= PHP_EOL; $class .= PHP_EOL;
} }
if(!empty($this->includes)) { if (!empty($this->includes)) {
foreach($this->includes as $include) { foreach ($this->includes as $include) {
$class .= 'include_once "' . $include . '";' . PHP_EOL; $class .= 'include_once "' . $include . '";' . PHP_EOL;
} }
$class .= PHP_EOL; $class .= PHP_EOL;
} }
if(isset($namespace)) { if (isset($namespace)) {
$class = $namespace . ';' . PHP_EOL . PHP_EOL; $class = $namespace . ';' . PHP_EOL . PHP_EOL;
} }
if(!empty($this->use)) { if (!empty($this->use)) {
foreach($this->use as $as => $use) { foreach ($this->use as $as => $use) {
$class .= 'use ' . $use . (is_string($as) ? ' as ' . $as : '') . ';' . PHP_EOL; $class .= 'use ' . $use . (is_string($as) ? ' as ' . $as : '') . ';' . PHP_EOL;
} }
$class .= PHP_EOL; $class .= PHP_EOL;
} }
if($this->isfinal) { if ($this->isfinal) {
$class .= 'final '; $class .= 'final ';
} }
if($this->isAbstract) { if ($this->isAbstract) {
$class .= 'abstract '; $class .= 'abstract ';
} }
$class .= $this->type . ' ' . $this->name . ' '; $class .= $this->type . ' ' . $this->name . ' ';
if(isset($this->extends)) { if (isset($this->extends)) {
$class .= 'extends ' . $this->extends . ' '; $class .= 'extends ' . $this->extends . ' ';
} }
if(!empty($this->implements)) { if (!empty($this->implements)) {
$class .= 'implements ' . implode(', ', $this->implements) . PHP_EOL; $class .= 'implements ' . implode(', ', $this->implements) . PHP_EOL;
} }
$class .= '{' . PHP_EOL . PHP_EOL; $class .= '{' . PHP_EOL . PHP_EOL;
if(!empty($this->traits)) { if (!empty($this->traits)) {
foreach($this->traits as $as => $trait) { foreach ($this->traits as $as => $trait) {
$class .= 'use ' . $trait . ';' . PHP_EOL; $class .= 'use ' . $trait . ';' . PHP_EOL;
} }
$class .= PHP_EOL; $class .= PHP_EOL;
} }
foreach($this->members as $name => $member) { foreach ($this->members as $name => $member) {
$class .= $member->parse() . PHP_EOL . PHP_EOL; $class .= $member->parse() . PHP_EOL . PHP_EOL;
} }
foreach($this->functions as $name => $function) { foreach ($this->functions as $name => $function) {
$class .= $function->parse() . PHP_EOL . PHP_EOL; $class .= $function->parse() . PHP_EOL . PHP_EOL;
} }

View File

@ -32,7 +32,7 @@ use phpOMS\Datatypes\Enum;
*/ */
abstract class ClassType extends Enum abstract class ClassType extends Enum
{ {
const _CLASS = 'class'; const _CLASS = 'class';
const _TRAIT = 'trait'; const _TRAIT = 'trait';
const _INTERFACE = 'interface'; const _INTERFACE = 'interface';
} }

View File

@ -102,9 +102,9 @@ class FunctionParser
{ {
$this->isAbstract = $abstract; $this->isAbstract = $abstract;
if($this->isAbstract) { if ($this->isAbstract) {
$this->body = null; $this->body = null;
} elseif(!$this->isAbstract && !isset($this->body)) { } elseif (!$this->isAbstract && !isset($this->body)) {
$this->body = ''; $this->body = '';
} }
} }
@ -134,8 +134,8 @@ class FunctionParser
$this->parameters[$name]['name'] = $name; $this->parameters[$name]['name'] = $name;
$this->parameters[$name]['typehint'] = $typehint; $this->parameters[$name]['typehint'] = $typehint;
if(isset($default)) { if (isset($default)) {
if($default === 'null') { if ($default === 'null') {
$default = null; $default = null;
} }
@ -148,31 +148,31 @@ class FunctionParser
$function = ''; $function = '';
$member .= str_repeat(' ', ClassParser::INDENT); $member .= str_repeat(' ', ClassParser::INDENT);
if($this->isFinal) { if ($this->isFinal) {
$member .= 'final '; $member .= 'final ';
} }
if($this->isAbstract) { if ($this->isAbstract) {
$member .= 'abstract '; $member .= 'abstract ';
} }
$member .= $this->visibility . ' '; $member .= $this->visibility . ' ';
if($this->isStatic) { if ($this->isStatic) {
$member .= 'static '; $member .= 'static ';
} }
$member .= 'function ' . $this->name . '('; $member .= 'function ' . $this->name . '(';
$parameters = ''; $parameters = '';
foreach($this->parameters as $name => $para) { foreach ($this->parameters as $name => $para) {
$parameters = (isset($para['typehint']) ? $para['typehint'] . ' ' : '') . $para['name'] . (array_key_exists('default', $para) ? ' = ' . MemberParser::parseVariable($para['default']) : '') . ', '; $parameters = (isset($para['typehint']) ? $para['typehint'] . ' ' : '') . $para['name'] . (array_key_exists('default', $para) ? ' = ' . MemberParser::parseVariable($para['default']) : '') . ', ';
} }
$member .= rtrim($parameters, ', ') . ') '; $member .= rtrim($parameters, ', ') . ') ';
$member .= ($this->return ?? '') . PHP_EOL; $member .= ($this->return ?? '') . PHP_EOL;
if(isset($this->body)) { if (isset($this->body)) {
$member .= str_repeat(' ', ClassParser::INDENT) . '{' . PHP_EOL . $this->addIndent($this->body) . PHP_EOL . str_repeat(' ', ClassParser::INDENT) . '}'; $member .= str_repeat(' ', ClassParser::INDENT) . '{' . PHP_EOL . $this->addIndent($this->body) . PHP_EOL . str_repeat(' ', ClassParser::INDENT) . '}';
} else { } else {
$member .= ';'; $member .= ';';
@ -185,7 +185,7 @@ class FunctionParser
{ {
$body = preg_split('/\r\n|\r|\n/', $this->body); $body = preg_split('/\r\n|\r|\n/', $this->body);
foreach($body as &$line) { foreach ($body as &$line) {
$line = str_repeat(' ', ClassParser::INDENT) . $line; $line = str_repeat(' ', ClassParser::INDENT) . $line;
} }

View File

@ -62,7 +62,7 @@ class MemberParser
public function setStatic(bool $static) { public function setStatic(bool $static) {
$this->isStatic = $static; $this->isStatic = $static;
if($this->isStatic) { if ($this->isStatic) {
$this->isConst = false; $this->isConst = false;
} }
} }
@ -76,7 +76,7 @@ class MemberParser
{ {
$this->isConst = $const; $this->isConst = $const;
if($this->isConst) { if ($this->isConst) {
$this->isStatic = false; $this->isStatic = false;
} }
} }
@ -92,11 +92,11 @@ class MemberParser
$member .= $this->visibility . ' '; $member .= $this->visibility . ' ';
if($this->isStatic) { if ($this->isStatic) {
$member .= 'static '; $member .= 'static ';
} }
if($this->isConst) { if ($this->isConst) {
$member .= 'const '; $member .= 'const ';
} }
@ -115,17 +115,17 @@ class MemberParser
*/ */
public static function parseVariable($value) : string public static function parseVariable($value) : string
{ {
if(is_array($value)) { if (is_array($value)) {
return ArrayParser::serializeArray($value) . PHP_EOL; return ArrayParser::serializeArray($value) . PHP_EOL;
} elseif(is_string($value)) { } elseif (is_string($value)) {
return '"' . $value . '"'; return '"' . $value . '"';
} elseif(is_scalar($value)) { } elseif (is_scalar($value)) {
return $value; return $value;
} elseif(is_null($value)) { } elseif (is_null($value)) {
return 'null'; return 'null';
} elseif(is_bool($value)) { } elseif (is_bool($value)) {
return $value ? 'true' : 'false'; return $value ? 'true' : 'false';
} elseif($value instanceOf \Serializable) { } elseif ($value instanceOf \Serializable) {
return self::parseVariable($value->serialize()); return self::parseVariable($value->serialize());
} else { } else {
throw new \UnexpectedValueException(); throw new \UnexpectedValueException();

View File

@ -32,7 +32,7 @@ use phpOMS\Datatypes\Enum;
*/ */
abstract class MemberVisibility extends Enum abstract class MemberVisibility extends Enum
{ {
const _PUBLIC = 'public'; const _PUBLIC = 'public';
const _PRIVATE = 'private'; const _PRIVATE = 'private';
const _PROTECTED = 'protected'; const _PROTECTED = 'protected';
} }

View File

@ -11,10 +11,10 @@ class Permutation
{ {
$permutations = []; $permutations = [];
if(empty($toPermute)){ if (empty($toPermute)) {
$permutations[] = implode('', $result); $permutations[] = implode('', $result);
} else{ } else {
foreach($toPermute as $key => $val){ foreach ($toPermute as $key => $val) {
$newArr = $toPermute; $newArr = $toPermute;
$newres = $result; $newres = $result;
$newres[] = $val; $newres[] = $val;

View File

@ -41,7 +41,7 @@ class ArrayRandomize
{ {
$shuffled = []; $shuffled = [];
while(!empty($arr)) { while (!empty($arr)) {
$rnd = array_rand($arr); $rnd = array_rand($arr);
$shuffled[] = $arr[$rnd]; $shuffled[] = $arr[$rnd];
array_splice($arr, $rnd, 1); array_splice($arr, $rnd, 1);
@ -62,7 +62,7 @@ class ArrayRandomize
{ {
$shuffled = []; $shuffled = [];
for($i = count($arr)-1; $i > 0; $i--){ for ($i = count($arr) - 1; $i > 0; $i--) {
$rnd = mt_rand(0, $i); $rnd = mt_rand(0, $i);
$shuffled[$i] = $arr[$rnd]; $shuffled[$i] = $arr[$rnd];
$shuffled[$rnd] = $arr[$i]; $shuffled[$rnd] = $arr[$i];

View File

@ -21,10 +21,10 @@ class BitcoinValidator
{ {
$decoded = decodeBase58($address); $decoded = decodeBase58($address);
$d1 = hash("sha256", substr($decoded,0,21), true); $d1 = hash("sha256", substr($decoded, 0, 21), true);
$d2 = hash("sha256", $d1, true); $d2 = hash("sha256", $d1, true);
if(substr_compare($decoded, $d2, 21, 4)) { if (substr_compare($decoded, $d2, 21, 4)) {
return false; return false;
} }
@ -38,26 +38,26 @@ class BitcoinValidator
$out = array_fill(0, 25, 0); $out = array_fill(0, 25, 0);
$len = strlen($input); $len = strlen($input);
for($i = 0; $i < $len; $i++){ for ($i = 0; $i < $len; $i++) {
if(($p=strpos($alphabet, $input[$i]))===false){ if (($p = strpos($alphabet, $input[$i])) === false) {
throw new \Exception("invalid character found"); throw new \Exception("invalid character found");
} }
$c = $p; $c = $p;
for ($j = 25; $j--; ) { for ($j = 25; $j--;) {
$c += (int)(58 * $out[$j]); $c += (int) (58 * $out[$j]);
$out[$j] = (int)($c % 256); $out[$j] = (int) ($c % 256);
$c /= 256; $c /= 256;
$c = (int)$c; $c = (int) $c;
} }
if($c !== 0){ if ($c !== 0) {
throw new \Exception("address too long"); throw new \Exception("address too long");
} }
} }
$result = ""; $result = "";
foreach($out as $val){ foreach ($out as $val) {
$result .= chr($val); $result .= chr($val);
} }