Combine classes from one category into single line

... kinda
This commit is contained in:
Ilya Prokopenko 2022-08-09 12:58:47 +07:00
parent 200414b67d
commit f3521c8ba4
No known key found for this signature in database
GPG key ID: 7736BBBB05F14A56
9 changed files with 24 additions and 50 deletions

View file

@ -1,14 +1,8 @@
<?php declare(strict_types=1); <?php declare(strict_types=1);
namespace openvk\Web\Presenters; namespace openvk\Web\Presenters;
use openvk\Web\Models\Entities\IP; use openvk\Web\Models\Entities\{IP, User, PasswordReset, EmailVerification};
use openvk\Web\Models\Entities\User; use openvk\Web\Models\Repositories\{IPs, Users, Restores, Verifications};
use openvk\Web\Models\Entities\PasswordReset;
use openvk\Web\Models\Entities\EmailVerification;
use openvk\Web\Models\Exceptions\InvalidUserNameException; use openvk\Web\Models\Exceptions\InvalidUserNameException;
use openvk\Web\Models\Repositories\IPs;
use openvk\Web\Models\Repositories\Users;
use openvk\Web\Models\Repositories\Restores;
use openvk\Web\Models\Repositories\Verifications;
use openvk\Web\Util\Validator; use openvk\Web\Util\Validator;
use Chandler\Session\Session; use Chandler\Session\Session;
use Chandler\Security\User as ChandlerUser; use Chandler\Security\User as ChandlerUser;

View file

@ -25,15 +25,15 @@ final class BlobPresenter extends OpenVKPresenter
$this->notFound(); $this->notFound();
if(isset($_SERVER["HTTP_IF_NONE_MATCH"])) if(isset($_SERVER["HTTP_IF_NONE_MATCH"]))
exit(header("HTTP/1.1 304 Not Modified")); exit(header("HTTP/1.1 304 Not Modified"));
header("Content-Type: " . mime_content_type($path)); header("Content-Type: " . mime_content_type($path));
header("Content-Size: " . filesize($path)); header("Content-Size: " . filesize($path));
header("Cache-Control: public, max-age=1210000"); header("Cache-Control: public, max-age=1210000");
header("X-Accel-Expires: 1210000"); header("X-Accel-Expires: 1210000");
header("ETag: W/\"" . hash_file("snefru", $path) . "\""); header("ETag: W/\"" . hash_file("snefru", $path) . "\"");
readfile($path); readfile($path);
exit; exit;
} }
} }

View file

@ -1,7 +1,6 @@
<?php declare(strict_types=1); <?php declare(strict_types=1);
namespace openvk\Web\Presenters; namespace openvk\Web\Presenters;
use openvk\Web\Models\Repositories\Users; use openvk\Web\Models\Repositories\{Users, Notes};
use openvk\Web\Models\Repositories\Notes;
use openvk\Web\Models\Entities\Note; use openvk\Web\Models\Entities\Note;
final class NotesPresenter extends OpenVKPresenter final class NotesPresenter extends OpenVKPresenter

View file

@ -1,12 +1,7 @@
<?php declare(strict_types=1); <?php declare(strict_types=1);
namespace openvk\Web\Presenters; namespace openvk\Web\Presenters;
use openvk\Web\Models\Entities\Club; use openvk\Web\Models\Entities\{Club, Photo, Album};
use openvk\Web\Models\Entities\Photo; use openvk\Web\Models\Repositories\{Photos, Albums, Users, Clubs};
use openvk\Web\Models\Entities\Album;
use openvk\Web\Models\Repositories\Photos;
use openvk\Web\Models\Repositories\Albums;
use openvk\Web\Models\Repositories\Users;
use openvk\Web\Models\Repositories\Clubs;
use Nette\InvalidStateException as ISE; use Nette\InvalidStateException as ISE;
final class PhotosPresenter extends OpenVKPresenter final class PhotosPresenter extends OpenVKPresenter

View file

@ -1,9 +1,7 @@
<?php declare(strict_types=1); <?php declare(strict_types=1);
namespace openvk\Web\Presenters; namespace openvk\Web\Presenters;
use openvk\Web\Models\Repositories\Users; use openvk\Web\Models\Entities\{User, Club};
use openvk\Web\Models\Entities\User; use openvk\Web\Models\Repositories\{Users, Clubs};
use openvk\Web\Models\Repositories\Clubs;
use openvk\Web\Models\Entities\Club;
use Chandler\Database\DatabaseConnection; use Chandler\Database\DatabaseConnection;
final class SearchPresenter extends OpenVKPresenter final class SearchPresenter extends OpenVKPresenter

View file

@ -1,9 +1,7 @@
<?php declare(strict_types=1); <?php declare(strict_types=1);
namespace openvk\Web\Presenters; namespace openvk\Web\Presenters;
use openvk\Web\Models\Entities\Ticket; use openvk\Web\Models\Entities\{Ticket, TicketComment};
use openvk\Web\Models\Repositories\{Tickets, Users}; use openvk\Web\Models\Repositories\{Tickets, Users, TicketComments};
use openvk\Web\Models\Entities\TicketComment;
use openvk\Web\Models\Repositories\TicketComments;
use openvk\Web\Util\Telegram; use openvk\Web\Util\Telegram;
use Chandler\Session\Session; use Chandler\Session\Session;
use Chandler\Database\DatabaseConnection; use Chandler\Database\DatabaseConnection;

View file

@ -1,7 +1,6 @@
<?php declare(strict_types=1); <?php declare(strict_types=1);
namespace openvk\Web\Presenters; namespace openvk\Web\Presenters;
use openvk\Web\Models\Repositories\Users; use openvk\Web\Models\Repositories\{Users, Clubs};
use openvk\Web\Models\Repositories\Clubs;
final class UnknownTextRouteStrategyPresenter extends OpenVKPresenter final class UnknownTextRouteStrategyPresenter extends OpenVKPresenter
{ {

View file

@ -2,19 +2,11 @@
namespace openvk\Web\Presenters; namespace openvk\Web\Presenters;
use openvk\Web\Util\Sms; use openvk\Web\Util\Sms;
use openvk\Web\Themes\Themepacks; use openvk\Web\Themes\Themepacks;
use openvk\Web\Models\Entities\Photo; use openvk\Web\Models\Entities\{Photo, Post, EmailChangeVerification};
use openvk\Web\Models\Entities\Post; use openvk\Web\Models\Entities\Notifications\{CoinsTransferNotification, RatingUpNotification};
use openvk\Web\Models\Repositories\Users; use openvk\Web\Models\Repositories\{Users, Clubs, Albums, Videos, Notes, Vouchers, EmailChangeVerifications};
use openvk\Web\Models\Repositories\Clubs;
use openvk\Web\Models\Repositories\Albums;
use openvk\Web\Models\Repositories\Videos;
use openvk\Web\Models\Repositories\Notes;
use openvk\Web\Models\Repositories\Vouchers;
use openvk\Web\Models\Repositories\EmailChangeVerifications;
use openvk\Web\Models\Exceptions\InvalidUserNameException; use openvk\Web\Models\Exceptions\InvalidUserNameException;
use openvk\Web\Util\Validator; use openvk\Web\Util\Validator;
use openvk\Web\Models\Entities\Notifications\{CoinsTransferNotification, RatingUpNotification};
use openvk\Web\Models\Entities\EmailChangeVerification;
use Chandler\Security\Authenticator; use Chandler\Security\Authenticator;
use lfkeitel\phptotp\{Base32, Totp}; use lfkeitel\phptotp\{Base32, Totp};
use chillerlan\QRCode\{QRCode, QROptions}; use chillerlan\QRCode\{QRCode, QROptions};

View file

@ -1,8 +1,7 @@
<?php declare(strict_types=1); <?php declare(strict_types=1);
namespace openvk\Web\Presenters; namespace openvk\Web\Presenters;
use openvk\Web\Models\Entities\Video; use openvk\Web\Models\Entities\Video;
use openvk\Web\Models\Repositories\Users; use openvk\Web\Models\Repositories\{Users, Videos};
use openvk\Web\Models\Repositories\Videos;
use Nette\InvalidStateException as ISE; use Nette\InvalidStateException as ISE;
final class VideosPresenter extends OpenVKPresenter final class VideosPresenter extends OpenVKPresenter