FIX: comply with psr-2

This commit is contained in:
Andreas Piening 2018-04-09 11:27:20 +12:00
parent d0149f8995
commit cbca821c9b

View File

@ -143,7 +143,9 @@ class JSONDataFormatter extends DataFormatter
$innerParts = array(); $innerParts = array();
$items = $obj->$relName(); $items = $obj->$relName();
foreach ($items as $item) { foreach ($items as $item) {
if (!$item->canView()) continue; if (!$item->canView()) {
continue;
}
$rel = $this->config()->api_base . $this->sanitiseClassName($relClass) . "/$item->ID"; $rel = $this->config()->api_base . $this->sanitiseClassName($relClass) . "/$item->ID";
$href = Director::absoluteURL($rel); $href = Director::absoluteURL($rel);
$innerParts[] = ArrayData::array_to_object(array( $innerParts[] = ArrayData::array_to_object(array(