From b24139113daf45188231ead6bbc72329d8427b75 Mon Sep 17 00:00:00 2001 From: sc0Vu Date: Tue, 26 Dec 2017 16:10:56 +0800 Subject: [PATCH] Remove useless strtolower --- src/Eth.php | 2 +- src/Net.php | 2 +- src/Personal.php | 2 +- src/Web3.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Eth.php b/src/Eth.php index bb9bb2c..3ec52ce 100644 --- a/src/Eth.php +++ b/src/Eth.php @@ -372,7 +372,7 @@ class Eth $class = explode('\\', get_class()); - if (strtolower($class[1]) === 'eth' && preg_match('/^[a-zA-Z0-9]+$/', $name) === 1) { + if (preg_match('/^[a-zA-Z0-9]+$/', $name) === 1) { $method = strtolower($class[1]) . '_' . $name; if (!array_key_exists($method, $this->methods)) { diff --git a/src/Net.php b/src/Net.php index 77a9451..d7e4f33 100644 --- a/src/Net.php +++ b/src/Net.php @@ -71,7 +71,7 @@ class Net $class = explode('\\', get_class()); - if (strtolower($class[1]) === 'net' && preg_match('/^[a-zA-Z0-9]+$/', $name) === 1) { + if (preg_match('/^[a-zA-Z0-9]+$/', $name) === 1) { $method = strtolower($class[1]) . '_' . $name; if (!array_key_exists($method, $this->methods)) { diff --git a/src/Personal.php b/src/Personal.php index 3b049dd..e3f48e4 100644 --- a/src/Personal.php +++ b/src/Personal.php @@ -101,7 +101,7 @@ class Personal $class = explode('\\', get_class()); - if (strtolower($class[1]) === 'personal' && preg_match('/^[a-zA-Z0-9]+$/', $name) === 1) { + if (preg_match('/^[a-zA-Z0-9]+$/', $name) === 1) { $method = strtolower($class[1]) . '_' . $name; if (!array_key_exists($method, $this->methods)) { diff --git a/src/Web3.php b/src/Web3.php index 9a6d017..eae8ae1 100644 --- a/src/Web3.php +++ b/src/Web3.php @@ -109,7 +109,7 @@ class Web3 $class = explode('\\', get_class()); - if (strtolower($class[1]) === 'web3' && preg_match('/^[a-zA-Z0-9]+$/', $name) === 1) { + if (preg_match('/^[a-zA-Z0-9]+$/', $name) === 1) { $method = strtolower($class[1]) . '_' . $name; if (!array_key_exists($method, $this->methods)) {