What is the difference in class coupling if you use these 3 types of usages:
Case 1
use UserRepository
...
UserRepository::getUser();
Case 2
App::make('UserRepository')->getUser();
Case 3
public function __construct(UserRepository $userRepository)
{
$this->userRepository = $userRepository;
}
...
$this->userRepository->getUser();
Is there any reason to prefer one over the other?
EDIT
I feel as though the constructor option is the best way to go, but I find myself in question when I need to include 3 services and 3 repositories in the controller which then very soon escalates to 6 parameters in constructor.
EDIT - Case 4
What about when you're using a facade instead?
EDIT - Case 5
What about when you specify it as \UserRepository
?