Add comments,__get and __set.

This commit is contained in:
sc0Vu 2018-02-07 13:55:32 +08:00
parent e9b03bcef4
commit bb523cc04b
12 changed files with 38 additions and 35 deletions

View File

@ -98,8 +98,8 @@ class Contract
/** /**
* construct * construct
* *
* @param mixed string | Web3\Providers\Provider $provider * @param string|\Web3\Providers\Provider $provider
* @param mixed string | stdClass | array $abi * @param string|\stdClass|array $abi
* @return void * @return void
*/ */
public function __construct($provider, $abi) public function __construct($provider, $abi)
@ -202,7 +202,7 @@ class Contract
/** /**
* setProvider * setProvider
* *
* @param $provider * @param \Web3\Providers\Provider $provider
* @return $this * @return $this
*/ */
public function setProvider($provider) public function setProvider($provider)

View File

@ -52,6 +52,7 @@ class Ethabi
if (method_exists($this, $method)) { if (method_exists($this, $method)) {
return call_user_func_array([$this, $method], []); return call_user_func_array([$this, $method], []);
} }
return false;
} }
/** /**
@ -59,7 +60,7 @@ class Ethabi
* *
* @param string $name * @param string $name
* @param mixed $value * @param mixed $value
* @return bool * @return mixed
*/ */
public function __set($name, $value) public function __set($name, $value)
{ {

View File

@ -21,10 +21,7 @@ class SolidityType
* *
* @return void * @return void
*/ */
public function __construct() // public function __construct() {}
{
//
}
/** /**
* get * get
@ -39,6 +36,7 @@ class SolidityType
if (method_exists($this, $method)) { if (method_exists($this, $method)) {
return call_user_func_array([$this, $method], []); return call_user_func_array([$this, $method], []);
} }
return false;
} }
/** /**
@ -46,7 +44,7 @@ class SolidityType
* *
* @param string $name * @param string $name
* @param mixed $value * @param mixed $value
* @return bool * @return mixed;
*/ */
public function __set($name, $value) public function __set($name, $value)
{ {
@ -65,10 +63,7 @@ class SolidityType
* @param array $arguments * @param array $arguments
* @return void * @return void
*/ */
public static function __callStatic($name, $arguments) // public static function __callStatic($name, $arguments) {}
{
//
}
/** /**
* nestedTypes * nestedTypes

View File

@ -44,7 +44,7 @@ class Eth
/** /**
* construct * construct
* *
* @param mixed string | Web3\Providers\Provider $provider * @param string|\Web3\Providers\Provider $provider
* @return void * @return void
*/ */
public function __construct($provider) public function __construct($provider)
@ -120,6 +120,7 @@ class Eth
if (method_exists($this, $method)) { if (method_exists($this, $method)) {
return call_user_func_array([$this, $method], []); return call_user_func_array([$this, $method], []);
} }
return false;
} }
/** /**
@ -127,7 +128,7 @@ class Eth
* *
* @param string $name * @param string $name
* @param mixed $value * @param mixed $value
* @return bool * @return mixed
*/ */
public function __set($name, $value) public function __set($name, $value)
{ {
@ -152,7 +153,7 @@ class Eth
/** /**
* setProvider * setProvider
* *
* @param $provider * @param \Web3\Providers\Provider $provider
* @return bool * @return bool
*/ */
public function setProvider($provider) public function setProvider($provider)

View File

@ -70,6 +70,7 @@ class JSONRPC implements IRPC
if (method_exists($this, $method)) { if (method_exists($this, $method)) {
return call_user_func_array([$this, $method], []); return call_user_func_array([$this, $method], []);
} }
return false;
} }
/** /**
@ -77,7 +78,7 @@ class JSONRPC implements IRPC
* *
* @param string $name * @param string $name
* @param mixed $value * @param mixed $value
* @return bool * @return mixed
*/ */
public function __set($name, $value) public function __set($name, $value)
{ {
@ -92,7 +93,7 @@ class JSONRPC implements IRPC
/** /**
* __toString * __toString
* *
* @return array * @return string
*/ */
public function __toString() public function __toString()
{ {
@ -151,7 +152,7 @@ class JSONRPC implements IRPC
* setArguments * setArguments
* *
* @param array $arguments * @param array $arguments
* @return array * @return bool
*/ */
public function setArguments($arguments) public function setArguments($arguments)
{ {
@ -159,6 +160,8 @@ class JSONRPC implements IRPC
throw new InvalidArgumentException('Please use array when call setArguments.'); throw new InvalidArgumentException('Please use array when call setArguments.');
} }
$this->arguments = $arguments; $this->arguments = $arguments;
return true;
} }
/** /**

View File

@ -44,7 +44,7 @@ class Net
/** /**
* construct * construct
* *
* @param mixed string | Web3\Providers\Provider $provider * @param string|\Web3\Providers\Provider $provider
* @return void * @return void
*/ */
public function __construct($provider) public function __construct($provider)
@ -120,6 +120,7 @@ class Net
if (method_exists($this, $method)) { if (method_exists($this, $method)) {
return call_user_func_array([$this, $method], []); return call_user_func_array([$this, $method], []);
} }
return false;
} }
/** /**
@ -127,7 +128,7 @@ class Net
* *
* @param string $name * @param string $name
* @param mixed $value * @param mixed $value
* @return bool * @return mixed
*/ */
public function __set($name, $value) public function __set($name, $value)
{ {
@ -152,7 +153,7 @@ class Net
/** /**
* setProvider * setProvider
* *
* @param $provider * @param \Web3\Providers\Provider $provider
* @return bool * @return bool
*/ */
public function setProvider($provider) public function setProvider($provider)

View File

@ -44,7 +44,7 @@ class Personal
/** /**
* construct * construct
* *
* @param mixed string | Web3\Providers\Provider $provider * @param string|\Web3\Providers\Provider $provider
* @return void * @return void
*/ */
public function __construct($provider) public function __construct($provider)
@ -120,6 +120,7 @@ class Personal
if (method_exists($this, $method)) { if (method_exists($this, $method)) {
return call_user_func_array([$this, $method], []); return call_user_func_array([$this, $method], []);
} }
return false;
} }
/** /**
@ -127,7 +128,7 @@ class Personal
* *
* @param string $name * @param string $name
* @param mixed $value * @param mixed $value
* @return bool * @return mixed
*/ */
public function __set($name, $value) public function __set($name, $value)
{ {
@ -152,7 +153,7 @@ class Personal
/** /**
* setProvider * setProvider
* *
* @param $provider * @param \Web3\Providers\Provider $provider
* @return bool * @return bool
*/ */
public function setProvider($provider) public function setProvider($provider)

View File

@ -74,6 +74,7 @@ class Provider
if (method_exists($this, $method)) { if (method_exists($this, $method)) {
return call_user_func_array([$this, $method], []); return call_user_func_array([$this, $method], []);
} }
return false;
} }
/** /**

View File

@ -45,6 +45,7 @@ class RequestManager
if (method_exists($this, $method)) { if (method_exists($this, $method)) {
return call_user_func_array([$this, $method], []); return call_user_func_array([$this, $method], []);
} }
return false;
} }
/** /**

View File

@ -45,7 +45,7 @@ class Shh
/** /**
* construct * construct
* *
* @param mixed string | Web3\Providers\Provider $provider * @param string|\Web3\Providers\Provider $provider
* @return void * @return void
*/ */
public function __construct($provider) public function __construct($provider)
@ -121,6 +121,7 @@ class Shh
if (method_exists($this, $method)) { if (method_exists($this, $method)) {
return call_user_func_array([$this, $method], []); return call_user_func_array([$this, $method], []);
} }
return false;
} }
/** /**
@ -128,7 +129,7 @@ class Shh
* *
* @param string $name * @param string $name
* @param mixed $value * @param mixed $value
* @return bool * @return mixed
*/ */
public function __set($name, $value) public function __set($name, $value)
{ {
@ -153,7 +154,7 @@ class Shh
/** /**
* setProvider * setProvider
* *
* @param $provider * @param \Web3\Providers\Provider $provider
* @return bool * @return bool
*/ */
public function setProvider($provider) public function setProvider($provider)

View File

@ -67,10 +67,7 @@ class Utils
* *
* @return void * @return void
*/ */
public function __construct() // public function __construct() {}
{
//
}
/** /**
* toHex * toHex

View File

@ -84,7 +84,7 @@ class Web3
/** /**
* construct * construct
* *
* @param mixed string | Web3\Providers\Provider $provider * @param string|\Web3\Providers\Provider $provider
* @return void * @return void
*/ */
public function __construct($provider) public function __construct($provider)
@ -160,6 +160,7 @@ class Web3
if (method_exists($this, $method)) { if (method_exists($this, $method)) {
return call_user_func_array([$this, $method], []); return call_user_func_array([$this, $method], []);
} }
return false;
} }
/** /**
@ -167,7 +168,7 @@ class Web3
* *
* @param string $name * @param string $name
* @param mixed $value * @param mixed $value
* @return bool * @return mixed
*/ */
public function __set($name, $value) public function __set($name, $value)
{ {
@ -192,7 +193,7 @@ class Web3
/** /**
* setProvider * setProvider
* *
* @param $provider * @param \Web3\Providers\Provider $provider
* @return bool * @return bool
*/ */
public function setProvider($provider) public function setProvider($provider)