PHP编码风格规范详细介绍( 二 )


$title = [];
for ($x = 0; $x < $diamondCount; $x++) {
if ($polluted) {
$title[] = new PollutionDecorator(new DiamondDecorator(new Plains()));
} else {
$title[] = new DiamondDecorator(new Plains());
}
}




推荐阅读