# 代碼規范
>[danger]Laravel 遵循[PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)編碼規范和[PSR-4](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md)自動加載規范。
## Laravel 文檔注釋
### PHPDoc
>[success]以下是正確寫法的 Laravel 文檔注釋。請注意,`@param`屬性后跟兩個空格、參數類型、兩個空格,最后是變量名稱:
~~~php
/**
* Register a binding with the container.
*
* @param string|array $abstract
* @param \Closure|string|null $concrete
* @param bool $shared
* @return void
*/
public function bind($abstract, $concrete = null, $shared = false)
{
//
}
~~~