Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
| 1 | <?php |
||
| 10 | class NewsletterFacadeTest extends TestCase |
||
|
|
|||
| 11 | { |
||
| 12 | /** @test */ |
||
| 13 | public function should_instantiate_facade_with_null_driver() |
||
| 18 | |||
| 19 | /** @test */ |
||
| 20 | View Code Duplication | public function should_instantiate_facade_with_mailchimp_driver() |
|
| 29 | |||
| 30 | /** @test */ |
||
| 31 | View Code Duplication | public function should_instantiate_facade_with_mailjet_driver() |
|
| 41 | |||
| 42 | } |
||
| 43 |