diff options
author | Toon Schoenmakers <toon.schoenmakers@copernica.com> | 2014-09-25 11:04:09 +0200 |
---|---|---|
committer | Toon Schoenmakers <toon.schoenmakers@copernica.com> | 2014-09-25 11:04:09 +0200 |
commit | 3ddc5c9e3777fff5c17f74902bb5ddc7cdaf1eb1 (patch) | |
tree | dd6cd8934be41455576f06b79742041974559af6 | |
parent | 700a574000d8f5cfdd407a0a4b634ad7fcadc54f (diff) |
Made Type::Null the default type on ByVal and ByRef as this will allow any type (aka no type hinting)
-rw-r--r-- | include/byref.h | 8 | ||||
-rw-r--r-- | include/byval.h | 8 | ||||
-rw-r--r-- | include/type.h | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/include/byref.h b/include/byref.h index e828660..317c5c6 100644 --- a/include/byref.h +++ b/include/byref.h @@ -24,8 +24,8 @@ public: * @param type Argument type * @param required Is this argument required? */ - ByRef(const char *name, Type type, bool required = true) : Argument(name, type, required, true) {} - + ByRef(const char *name, Type type = Type::Null, bool required = true) : Argument(name, type, required, true) {} + /** * Constructor * @param name Name of the argument @@ -34,7 +34,7 @@ public: * @param required Is this argument required? */ ByRef(const char *name, const char *classname, bool nullable = false, bool required = true) : Argument(name, classname, nullable, required, true) {} - + /** * Copy constructor * @param argument @@ -46,7 +46,7 @@ public: * @param argument */ ByRef(ByRef &&argument) : Argument(argument) {} - + /** * Destructor */ diff --git a/include/byval.h b/include/byval.h index 40a458c..66f9b8f 100644 --- a/include/byval.h +++ b/include/byval.h @@ -24,8 +24,8 @@ public: * @param type Argument type * @param required Is this argument required? */ - ByVal(const char *name, Type type, bool required = true) : Argument(name, type, required, false) {} - + ByVal(const char *name, Type type = Type::Null, bool required = true) : Argument(name, type, required, false) {} + /** * Constructor * @param name Name of the argument @@ -34,7 +34,7 @@ public: * @param required Is this argument required? */ ByVal(const char *name, const char *classname, bool nullable = false, bool required = true) : Argument(name, classname, nullable, required, false) {} - + /** * Copy constructor * @param argument @@ -46,7 +46,7 @@ public: * @param argument */ ByVal(ByVal &&argument) : Argument(argument) {} - + /** * Destructor */ diff --git a/include/type.h b/include/type.h index bec0fd5..d248455 100644 --- a/include/type.h +++ b/include/type.h @@ -18,7 +18,7 @@ namespace Php { * The values are the same as the ones used internally in Zend */ enum class Type : unsigned char { - Null = 0, + Null = 0, // Null will allow any type Numeric = 1, Float = 2, Bool = 3, |