fixed phpdoc
fixed phpdoc
additional condition
better code
type cast