Created
September 3, 2019 14:42
-
-
Save guillaumebdx/b76e0c645b81caa4925859a817cbde06 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
| //... | |
| public function forward() | |
| { | |
| $this->currentSpeed = 15; | |
| $this->echoStatus("Go !"); | |
| } | |
| public function brake() | |
| { | |
| while ($this->currentSpeed > 0) { | |
| $this->currentSpeed--; | |
| $this->echoStatus("Brake !!!"); | |
| } | |
| $this->echoStatus("I'm stopped"); | |
| } | |
| public function echoStatus($status) | |
| { | |
| echo $status; | |
| } | |
| //... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment