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 | |
| namespace Email; | |
| interface EmailAddress { | |
| public function isValid(): bool; | |
| public function asString(): string; | |
| } | |
| class ValidEmailAddress implements EmailAddress { |
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 | |
| class WebsiteContext{} | |
| class WrongSendMail | |
| { | |
| public function __construct(private WebsiteContext $website) {} | |
| public function send(int $emailId) {} |
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 | |
| use Psr\SimpleCache\CacheInterface; | |
| interface Api { | |
| public function get(array $data): mixed; | |
| } | |
| class CachedApi implements Api | |
| { |
OlderNewer