# 代码规范
>[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)
{
//
}
~~~