1 | <?php |
||
24 | class EmailProvider extends Provider |
||
25 | { |
||
26 | /** An array of methods that can be used to send email */ |
||
27 | protected $methods; |
||
28 | |||
29 | /** |
||
30 | * Enumerate all supported EmailServices and instacetate them |
||
31 | */ |
||
32 | protected function __construct() |
||
37 | |||
38 | /** |
||
39 | * Send the email |
||
40 | * |
||
41 | * @param Email\Email $email The email message to send |
||
42 | * @param string $methodName The class name of the email method |
||
43 | * |
||
44 | * @return boolean True if the email was sent, false otherwise |
||
45 | */ |
||
46 | public function sendEmail($email, $methodName = false) |
||
58 | } |
||
59 | /* vim: set tabstop=4 shiftwidth=4 expandtab: */ |
||
60 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.