Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type safe objects for each component #31

Open
g105b opened this issue Oct 13, 2022 · 0 comments
Open

Type safe objects for each component #31

g105b opened this issue Oct 13, 2022 · 0 comments

Comments

@g105b
Copy link
Member

g105b commented Oct 13, 2022

Rather than returning an array for everything, return an object of the appropriate type.

For example:

UpdateQuery::set():AssignmentList

class UpdateStudentName extends UpdateQuery {
  public function set():AssignmentList {
    return new AssignmentList(
      "name",
      new Assignment("updatedAt", new NowDate()),
    );
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant