Support: Remove some commented code and make code a little more consistent with the code style

This commit is contained in:
Maxim Leshchenko 2022-05-20 15:16:39 +01:00
parent 12210d0fb0
commit 0818e507a8
No known key found for this signature in database
GPG key ID: BB9C44A8733FBEEE
2 changed files with 3 additions and 31 deletions

View file

@ -1,8 +1,5 @@
<?php declare(strict_types=1); <?php declare(strict_types=1);
namespace openvk\Web\Models\Repositories; 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 openvk\Web\Models\Entities\TicketComment;
use Chandler\Database\DatabaseConnection; use Chandler\Database\DatabaseConnection;
@ -22,32 +19,6 @@ class TicketComments
foreach($this->comments->where(['ticket_id' => $ticket_id, 'deleted' => 0]) as $comment) yield new TicketComment($comment); 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 function get(int $id): ?TicketComment
{ {
$comment = $this->comments->get($id);; $comment = $this->comments->get($id);;

View file

@ -79,6 +79,7 @@ final class SupportPresenter extends OpenVKPresenter
$act = $this->queryParam("act") ?? "open"; $act = $this->queryParam("act") ?? "open";
switch($act) { switch($act) {
default: default:
# NOTICE falling through
case "open": case "open":
$state = 0; $state = 0;
break; break;