mirror of
https://github.com/silverstripe/silverstripe-restfulserver
synced 2024-10-22 14:05:58 +02:00
FIX: comply with psr-2
This commit is contained in:
parent
d0149f8995
commit
cbca821c9b
@ -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(
|
||||||
|
Loading…
Reference in New Issue
Block a user