PHP code example of samlitowitz / phpstan-opinionated-nomenclature

1. Go to this page and download the library: Download samlitowitz/phpstan-opinionated-nomenclature library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

samlitowitz / phpstan-opinionated-nomenclature example snippets


   
   namespace DTO; // bad
   namespace Client\Dto; // bad
   

   
   namespace Helper; // bad
   namespace Client\helper; // bad
   

   
   class DTO {} // bad
   class ClientDTO {} // bad
   

   
   class Helper {} // bad
   

   
   namespace Client;
   class ClientRequest {} // bad

   namespace Client\Request;
   class Request {} // bad
   

   
   class ClientClass {} // bad
   interface FileInterface {} // bad
   trait TransactionTrait {} // bad
   

   
   class NonFinalNoChildren {} // bad
   

   
   interface IWriter {} // bad