mirror of
https://github.com/openvk/openvk
synced 2025-04-19 14:43:01 +03:00
linter errors fix
This commit is contained in:
parent
b23b770634
commit
e4904347c4
1 changed files with 8 additions and 8 deletions
|
@ -13,7 +13,7 @@ class Faves
|
||||||
private $context;
|
private $context;
|
||||||
private $likes;
|
private $likes;
|
||||||
|
|
||||||
private function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->context = DatabaseConnection::i()->getContext();
|
$this->context = DatabaseConnection::i()->getContext();
|
||||||
$this->likes = $this->context->table("likes");
|
$this->likes = $this->context->table("likes");
|
||||||
|
@ -29,14 +29,14 @@ class Faves
|
||||||
return $fetch;
|
return $fetch;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fetchLikesSection(User $user, string $class = 'Post', int $page = 1, ?int $perPage = NULL): \Traversable
|
public function fetchLikesSection(User $user, string $class = 'Post', int $page = 1, ?int $perPage = null): \Traversable
|
||||||
{
|
{
|
||||||
$perPage ??= OPENVK_DEFAULT_PER_PAGE;
|
$perPage ??= OPENVK_DEFAULT_PER_PAGE;
|
||||||
$fetch = $this->fetchLikes($user, $class)->page($page, $perPage)->order("index DESC");
|
$fetch = $this->fetchLikes($user, $class)->page($page, $perPage)->order("index DESC");
|
||||||
foreach($fetch as $like) {
|
foreach ($fetch as $like) {
|
||||||
$className = "openvk\\Web\\Models\\Repositories\\".$class."s";
|
$className = "openvk\\Web\\Models\\Repositories\\" . $class . "s";
|
||||||
$repo = new $className;
|
$repo = new $className();
|
||||||
if(!$repo) {
|
if (!$repo) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue