Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / tokens / conduit / TokenQueryConduitAPIMethod.php
blobec0dcfb873c29c6c229b70cc8d0bd7af93f474a0
1 <?php
3 final class TokenQueryConduitAPIMethod extends TokenConduitAPIMethod {
5 public function getAPIMethodName() {
6 return 'token.query';
9 public function getMethodDescription() {
10 return pht('Query tokens.');
13 protected function defineParamTypes() {
14 return array();
17 protected function defineReturnType() {
18 return 'list<dict>';
21 protected function execute(ConduitAPIRequest $request) {
22 $query = id(new PhabricatorTokenQuery())
23 ->setViewer($request->getUser());
25 $tokens = $query->execute();
27 return $this->buildTokenDicts($tokens);