Skip to content

Commit 93417b1

Browse files
authored
fix: remove $flags
1 parent 5f5626f commit 93417b1

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/Controllers/ApiController.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,16 @@ public function returnPaginated(
145145
/**
146146
* Returns a HTTP response with the provided data encoded as JSON.
147147
*/
148-
public function returnArray(array $data, $flags = null): HTTPResponse
148+
public function returnArray(array $data): HTTPResponse
149149
{
150-
return $this->getResponse()->setBody(json_encode($data, $flags));
150+
return $this->getResponse()->setBody(json_encode($data));
151151
}
152152

153153

154154
/**
155155
* Convert a provided DataList to a PaginatedList and return the source.
156156
*/
157-
public function prepList(SS_List $list, ?callable $keyFunc = null, ?callable $dataFunc = null,): array
157+
public function prepList(SS_List $list, ?callable $keyFunc = null, ?callable $dataFunc = null): array
158158
{
159159
$output = [];
160160

@@ -184,7 +184,12 @@ public function prepList(SS_List $list, ?callable $keyFunc = null, ?callable $da
184184
/**
185185
* Convert a provided List to a PaginatedList and return the source.
186186
*/
187-
public function prepPaginatedOutput(SS_List $list, ?callable $keyFunc = null, ?callable $dataFunc = null, ?int $pageLength = null): array
187+
public function prepPaginatedOutput(
188+
SS_List $list,
189+
?callable $keyFunc = null,
190+
?callable $dataFunc = null,
191+
?int $pageLength = null
192+
): array {
188193
{
189194
$list = PaginatedList::create($list, $this->request);
190195

0 commit comments

Comments
 (0)