"I wrote this function: function calculateDiscount($price, $percent) { return $price - ($price * $percent); } I call it with calculateDiscount(100, 20) expecting a 20% discount, but I'm not sure if I should pass 20 or 0.2 for $percent. Explain the bug risk here, and show me how adding type declarations and a docblock comment would make the correct usage obvious to someone calling this function without reading its internals."
