Normialize regular expressions
This commit is contained in:
parent
0042f0dd82
commit
12470f3b90
@ -34,7 +34,7 @@ class Address extends SolidityType implements IType
|
||||
*/
|
||||
public function isType($name)
|
||||
{
|
||||
return (preg_match('/address(\[([0-9]+)\])?/', $name) === 1);
|
||||
return (preg_match('/address(\[([0-9]+)\])*/', $name) === 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -34,7 +34,7 @@ class Boolean extends SolidityType implements IType
|
||||
*/
|
||||
public function isType($name)
|
||||
{
|
||||
return (preg_match('/bool(\[([0-9]+)\])?/', $name) === 1);
|
||||
return (preg_match('/bool(\[([0-9]+)\])*/', $name) === 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -34,7 +34,7 @@ class Bytes extends SolidityType implements IType
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -34,7 +34,7 @@ class Integer extends SolidityType implements IType
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user