Clean code

This commit is contained in:
sc0Vu 2018-12-12 00:08:52 +08:00
parent d579535485
commit 51abbc2f5e

View File

@ -155,21 +155,6 @@ class Ethabi
}
$typesLength = count($types);
$solidityTypes = $this->getSolidityTypes($types);
foreach ($types as $key => $type) {
$match = [];
if (preg_match('/^([a-zA-Z]+)/', $type, $match) === 1) {
if (isset($this->types[$match[0]])) {
$className = $this->types[$match[0]];
if (call_user_func([$this->types[$match[0]], 'isType'], $type) === false) {
throw new InvalidArgumentException('Unsupport solidity parameter type: ' . $type);
}
$solidityTypes[$key] = $className;
}
}
}
$encodes = array_fill(0, $typesLength, '');
foreach ($solidityTypes as $key => $type) {