run some autoformat

This commit is contained in:
2018-04-04 20:43:24 +02:00
parent eb5b76c5c8
commit 79341b4c88
16 changed files with 1026 additions and 1009 deletions

View File

@@ -1,4 +1,5 @@
<?php
/**
* Copyright 2018 Matthias Kesler
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -21,7 +22,7 @@ try {
$inputJSON = file_get_contents('php://input');
$input = json_decode($inputJSON, TRUE);
if (!isset($input)) {
throw new Exception('request body is no valid json');
throw new Exception('request body is no valid json');
}
if (!isset($input["lookup"])) {
@@ -43,16 +44,16 @@ try {
$res2 = $mx_db->searchUserByEmail($lookup["address"]);
if (!empty($res2)) {
array_push($response["lookup"], [
"medium" => $lookup["medium"],
"address" => $lookup["address"],
"id" => [
"type" => "localpart",
"value" => $res2[0]["user_id"],
]
"medium" => $lookup["medium"],
"address" => $lookup["address"],
"id" => [
"type" => "localpart",
"value" => $res2[0]["user_id"],
]
]
);
}
break;
break;
case "msisdn":
// This is reserved for number lookups
throw new Exception("unimplemented lookup medium");