Change isType regex
This commit is contained in:
parent
9521b2d167
commit
ee9855fcbf
@ -37,7 +37,7 @@ class Address extends SolidityType implements IType
|
|||||||
*/
|
*/
|
||||||
public function isType($name)
|
public function isType($name)
|
||||||
{
|
{
|
||||||
return (preg_match('/address(\[([0-9]*)\])*/', $name) === 1);
|
return (preg_match('/^address(\[([0-9]*)\])*/', $name) === 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,7 +35,7 @@ class Boolean extends SolidityType implements IType
|
|||||||
*/
|
*/
|
||||||
public function isType($name)
|
public function isType($name)
|
||||||
{
|
{
|
||||||
return (preg_match('/bool(\[([0-9]*)\])*/', $name) === 1);
|
return (preg_match('/^bool(\[([0-9]*)\])*/', $name) === 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,7 +36,7 @@ class Bytes extends SolidityType implements IType
|
|||||||
*/
|
*/
|
||||||
public function isType($name)
|
public function isType($name)
|
||||||
{
|
{
|
||||||
return (preg_match('/bytes([0-9]{1,})?(\[([0-9]*)\])*/', $name) === 1);
|
return (preg_match('/^bytes([0-9]{1,})?(\[([0-9]*)\])*/', $name) === 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,7 +36,7 @@ class DynamicBytes extends SolidityType implements IType
|
|||||||
*/
|
*/
|
||||||
public function isType($name)
|
public function isType($name)
|
||||||
{
|
{
|
||||||
return (preg_match('/bytes(\[([0-9]*)\])*/', $name) === 1);
|
return (preg_match('/^bytes(\[([0-9]*)\])*/', $name) === 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -37,7 +37,7 @@ class Integer extends SolidityType implements IType
|
|||||||
*/
|
*/
|
||||||
public function isType($name)
|
public function isType($name)
|
||||||
{
|
{
|
||||||
return (preg_match('/int([0-9]{1,})?(\[([0-9]*)\])*/', $name) === 1);
|
return (preg_match('/^int([0-9]{1,})?(\[([0-9]*)\])*/', $name) === 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -37,7 +37,7 @@ class Str extends SolidityType implements IType
|
|||||||
*/
|
*/
|
||||||
public function isType($name)
|
public function isType($name)
|
||||||
{
|
{
|
||||||
return (preg_match('/string(\[([0-9]*)\])*/', $name) === 1);
|
return (preg_match('/^string(\[([0-9]*)\])*/', $name) === 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -37,7 +37,7 @@ class Uinteger extends SolidityType implements IType
|
|||||||
*/
|
*/
|
||||||
public function isType($name)
|
public function isType($name)
|
||||||
{
|
{
|
||||||
return (preg_match('/uint([0-9]{1,})?(\[([0-9]*)\])*/', $name) === 1);
|
return (preg_match('/^uint([0-9]{1,})?(\[([0-9]*)\])*/', $name) === 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user