Pass reference

Let EthMethod validate pass reference that we can add default values directly.
This commit is contained in:
sc0Vu 2018-01-21 16:21:29 +08:00
parent d52a8ddfa0
commit 85b5cea599

View File

@ -84,7 +84,7 @@ class EthMethod extends JSONRPC implements IMethod
* @param array $params
* @return bool
*/
public function validate($params)
public function validate(&$params)
{
if (!is_array($params)) {
throw new InvalidArgumentException('Please use array params when call validate.');