Last active
February 29, 2024 13:03
-
-
Save mcsee/559b802e5a6a0e1aa432e594fe5f28dc to your computer and use it in GitHub Desktop.
This file contains 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
<? | |
final class Poll { | |
function _construct( | |
array $questions, | |
AnonnyomousStrategy $annonymousStrategy, | |
ValidationPolicy $validationPolicy) { | |
// ... | |
} | |
} | |
// invalid | |
new Poll([]); | |
new Poll([], new NoAnonnyomousValidStrategy()); | |
new Poll([], , new StrictValidationPolicy()); | |
// Valid | |
new Poll( | |
[], | |
new NoAnonnyomousValidStrategy(), new StrictValidationPolicy() | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment