Last active
January 18, 2019 02:10
-
-
Save triswan/963df0c4342e109fed89db2e1c23afeb to your computer and use it in GitHub Desktop.
Clean Code
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 | |
| function showUser() { | |
| $user = $this->model->getUserById(1); | |
| echo $user->name; | |
| echo $user->email; | |
| echo $user->phone; | |
| } |
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 | |
| function showUser() { | |
| $user = $this->model->getUserById(1); | |
| $this->printUser($user); | |
| } | |
| function printUser($user) { | |
| echo $user->name; | |
| echo $user->email; | |
| echo $user->phone; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment