Skip to content

Commit

Permalink
Issue 69: Add php return type in WopiController.
Browse files Browse the repository at this point in the history
  • Loading branch information
donquixote committed Dec 3, 2024
1 parent c040edd commit 4008413
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Controller/WopiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static function permissionDenied(): Response {
* @return \Symfony\Component\HttpFoundation\Response
* The response with file contents.
*/
public function wopiCheckFileInfo(string $id, Request $request) {
public function wopiCheckFileInfo(string $id, Request $request): Response {
$token = $request->query->get('access_token');

$jwt_payload = $this->verifyTokenForMediaId($token, $id);
Expand Down Expand Up @@ -143,7 +143,7 @@ public function wopiCheckFileInfo(string $id, Request $request) {
* @return \Symfony\Component\HttpFoundation\Response
* The response with file contents.
*/
public function wopiGetFile(string $id, Request $request) {
public function wopiGetFile(string $id, Request $request): Response {
$token = $request->query->get('access_token');

$jwt_payload = $this->verifyTokenForMediaId($token, $id);
Expand Down Expand Up @@ -177,7 +177,7 @@ public function wopiGetFile(string $id, Request $request) {
* @return \Symfony\Component\HttpFoundation\Response
* The response.
*/
public function wopiPutFile(string $id, Request $request) {
public function wopiPutFile(string $id, Request $request): Response {
$token = $request->query->get('access_token');
$timestamp = $request->headers->get('x-cool-wopi-timestamp');
$modified_by_user = $request->headers->get('x-cool-wopi-ismodifiedbyuser') == 'true';
Expand Down Expand Up @@ -280,7 +280,7 @@ public function wopiPutFile(string $id, Request $request) {
* @return \Symfony\Component\HttpFoundation\Response
* Response to be consumed by Collabora Online.
*/
public function wopi(string $action, string $id, Request $request) {
public function wopi(string $action, string $id, Request $request): Response {
$returnCode = Response::HTTP_BAD_REQUEST;
switch ($action) {
case 'info':
Expand Down

0 comments on commit 4008413

Please sign in to comment.