I've got a function, which (for example) returns true if access is allowed, false when access is denied, and NULL when access is indeterminate.
What should the @return
phpdoc be? bool
doesn't seem to make sense...
I've got a function, which (for example) returns true if access is allowed, false when access is denied, and NULL when access is indeterminate.
What should the @return
phpdoc be? bool
doesn't seem to make sense...
@return bool|null
See here:
The datatype should be a valid PHP type (int, string, bool, etc), a class name for the type of object returned, or simply "mixed". If you want to explicitly show multiple possible return types, list them pipe-delimited without spaces (e.g. "@return int|string").
If you want to follow php.net style about the return type. When there is multiple possibility of return data type, they use the type mixed
.
Example :