You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

574 B

Yii2 core code style

Proposals

Brackets

It's better to be consistent with brackets not to remember where should we use newline and where not:

class MyClass
{
	public function myClassMethod()
	{
		if($x)
		{
			// do it
		}
		else
		{
			// some code
		}
	}
}

Use brackets even for one line ifs.

Use type hinting like

public function __construct(CDbConnection $connection)
{
	$this->connection = $connection;
}

instead of

public function __construct($connection)
{
	$this->connection = $connection;
}