Created
January 22, 2014 16:22
-
-
Save ericlbarnes/8561773 to your computer and use it in GitHub Desktop.
Which one is better?
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
interface PostRepositoryInterface { | |
public function create($title, $content, $slug, array $meta, array $tags, $active, $user_id, Carbon $publish_date); | |
} | |
interface PostRepositoryInterface { | |
public function create(array $data); | |
} | |
interface PostRepositoryInterface {
public function create(array $data);
}
Any function taking more than 3-4 params is usually a code smell to me. At least until php gets named params.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@ericbarnes Makes sense.