mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
Support: Remove some commented code and make code a little more consistent with the code style
This commit is contained in:
parent
12210d0fb0
commit
0818e507a8
2 changed files with 3 additions and 31 deletions
|
@ -1,8 +1,5 @@
|
|||
<?php declare(strict_types=1);
|
||||
namespace openvk\Web\Models\Repositories;
|
||||
# use openvk\Web\Models\Entities\Ticket;
|
||||
# use openvk\Web\Models\Entities\User;
|
||||
# use openvk\Web\Models\Repositories\Users;
|
||||
use openvk\Web\Models\Entities\TicketComment;
|
||||
use Chandler\Database\DatabaseConnection;
|
||||
|
||||
|
@ -21,32 +18,6 @@ class TicketComments
|
|||
{
|
||||
foreach($this->comments->where(['ticket_id' => $ticket_id, 'deleted' => 0]) as $comment) yield new TicketComment($comment);
|
||||
}
|
||||
|
||||
# private function toTicket(?ActiveRow $ar): ?Ticket
|
||||
# {
|
||||
# return is_null($ar) ? NULL : new Ticket($ar);
|
||||
# }
|
||||
|
||||
# function getTicketsByuId(int $user_id): \Traversable
|
||||
# {
|
||||
# foreach($this->tickets->where(['user_id' => $user_id, 'deleted' => 0]) as $ticket) yield new Ticket($ticket);
|
||||
# }
|
||||
|
||||
# function getRequestById(int $req_id): ?Ticket
|
||||
# {
|
||||
# $requests = $this->tickets->where(['id' => $req_id])->fetch();
|
||||
# if(!is_null($requests))
|
||||
|
||||
# return new Req($requests);
|
||||
# else
|
||||
# return null;
|
||||
|
||||
# }
|
||||
|
||||
# function get(int $id): ?Ticket
|
||||
# {
|
||||
# return $this->toTicket($this->tickets->get($id));
|
||||
# }
|
||||
|
||||
function get(int $id): ?TicketComment
|
||||
{
|
||||
|
|
|
@ -79,12 +79,13 @@ final class SupportPresenter extends OpenVKPresenter
|
|||
$act = $this->queryParam("act") ?? "open";
|
||||
switch($act) {
|
||||
default:
|
||||
# NOTICE falling through
|
||||
case "open":
|
||||
$state = 0;
|
||||
break;
|
||||
break;
|
||||
case "answered":
|
||||
$state = 1;
|
||||
break;
|
||||
break;
|
||||
case "closed":
|
||||
$state = 2;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue