From 51abbc2f5ed7410b53d8b415b79269ee41270d25 Mon Sep 17 00:00:00 2001 From: sc0Vu Date: Wed, 12 Dec 2018 00:08:52 +0800 Subject: [PATCH] Clean code --- src/Contracts/Ethabi.php | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/Contracts/Ethabi.php b/src/Contracts/Ethabi.php index cf48ae0..5b8878d 100644 --- a/src/Contracts/Ethabi.php +++ b/src/Contracts/Ethabi.php @@ -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) {