Skip to content

Latest commit

 

History

History
executable file
·
22 lines (17 loc) · 441 Bytes

namespaces-naming.md

File metadata and controls

executable file
·
22 lines (17 loc) · 441 Bytes

PHP Naming Convention > Namespaces Naming

PascalCase

  • Begin with an uppercase letter
  • Use namespaces for all the PHP classes
  • Add a use statement for all the classes that are not part of the global namespace
<?php

namespace App\Models;

use App\Services\AvatarGenerator;

class SportTeam
{  
    // code snippet
    // any class of the namespace can be used
    // other class needs to be registered with "use"
}
?>