-
-
Save dev-scripts/09c6b232b0863bed2f63524695e301c3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Calculator; | |
| class Calculator | |
| { | |
| /** | |
| * @param $num1 | |
| * @param $num2 | |
| * | |
| * @return int | |
| */ | |
| public function add($num1, $num2) : int | |
| { | |
| return $num1 + $num2; | |
| } | |
| /** | |
| * @param $num1 | |
| * @param $num2 | |
| * | |
| * @return int | |
| */ | |
| public function subtract($num1, $num2) : int | |
| { | |
| return $num1 - $num2; | |
| } | |
| /** | |
| * @param $num1 | |
| * @param $num2 | |
| * | |
| * @return int | |
| */ | |
| public function multiply($num1, $num2) : int | |
| { | |
| return $num1 * $num2; | |
| } | |
| /** | |
| * @param $num1 | |
| * @param $num2 | |
| * | |
| * @return float | |
| */ | |
| public function divide($num1, $num2) : float | |
| { | |
| return $num1 / $num2; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment