title: PHP Namespace Class Naming Convention
body: <p>I currently follow PSR-2 and PSR-4. I'm running into a small dilemma when trying to name a few classes. Here's an example.</p>
  
  <p>I have a base REST client, <code>\Vendor\RestClient\AbstractClient</code>. I have two implementations of this Abstract Client:</p>
  
  <ul>
  <li><code>\Vendor\GoogleClient\GoogleClient</code></li>
  <li><code>\Vendor\GithubClient\GithubClient</code></li>
  </ul>
  
  <p>Is the naming of the client classes redundant since the namespace already specifies the domain? Should I instead name my classes:</p>
  
  <ul>
  <li><code>\Vendor\GoogleClient\Client</code></li>
  <li><code>\Vendor\GithubClient\Client</code></li>
  </ul>
  
  <p>This would mean client code would always use something like:</p>
  
  <pre><code>use Vendor\GoogleClient\Client;
  
  $client = new Client();
  </code></pre>
  
  <p>This is a little less verbose than:</p>
  
  <pre><code>use Vendor\GoogleClient\GoogleClient;
  
  $client = new GoogleClient();
  </code></pre>
  
  <p>But the first option allows us to easily swap out implementations by only changing the use statement.</p>
  
  <p>PSR4 specifies that <code>Interfaces</code> and <code>AbstractClasses</code> should be suffixed with <code>Interface</code> and prefixed with <code>Abstract</code> respectively, but it says nothing about domain specific prefixes/suffixes. Any opinions/suggestions?</p>