Skip to content

Instantly share code, notes, and snippets.

Last active Apr 14, 2016
What would you like to do?
How to write complex function
class CourseService {
public function signUp(SmartCode $code, User $user)
// 1. Check if the code is valid
// 2. Check if the user already has a code for this course
// 3. Register the code
// 4. Enroll the user with his code
// 5. Return enrollment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment