Skip to content

Commit

Permalink
* add phpdoc tying of the template from base class @ App\Repository
Browse files Browse the repository at this point in the history
* disable PhpStorm inspection `PhpMultipleClassDeclarationsInspection` for `\Attribute` @ `App\Validator\DateTimeRange`
* replace `QueryBuilder->addWhere()` with `->where()` as it's the first predicate being added in the branch of param `*Gender` @ `App\PostsQuery\SearchQuery\applyQueryParamsOnQuery()`
@ be
  • Loading branch information
n0099 committed Oct 11, 2024
1 parent a52de61 commit 63881f6
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion be/src/PostsQuery/SearchQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static function (QueryBuilder $newQueryWhenCacheMiss) use (&$outCachedUserQueryR
$sqlParamName,
$getAndCacheUserQuery($this->userRepository->createQueryBuilder('t')
->select('t.uid')
->andWhere("t.gender = :{$sqlParamName}_gender")
->where("t.gender = :{$sqlParamName}_gender")
->setParameter("{$sqlParamName}_gender", $value)),
),
'authorManagerType' =>
Expand Down
1 change: 1 addition & 0 deletions be/src/Repository/ForumRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use App\Entity\Forum;
use Doctrine\Persistence\ManagerRegistry;

/** @extends BaseRepository<Forum> */
class ForumRepository extends BaseRepository
{
public function __construct(ManagerRegistry $registry)
Expand Down
1 change: 1 addition & 0 deletions be/src/Repository/LatestReplierRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Doctrine\Persistence\ManagerRegistry;
use Illuminate\Support\Collection;

/** @extends BaseRepository<LatestReplier> */
class LatestReplierRepository extends BaseRepository
{
public function __construct(ManagerRegistry $registry)
Expand Down
4 changes: 1 addition & 3 deletions be/src/Repository/Post/Content/ReplyContentRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\DependencyInjection\Attribute\Exclude;

/**
* @extends PostContentRepository<ReplyContent>
*/
/** @extends PostContentRepository<ReplyContent> */
#[Exclude]
class ReplyContentRepository extends PostContentRepository
{
Expand Down
4 changes: 1 addition & 3 deletions be/src/Repository/Post/Content/SubReplyContentRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\DependencyInjection\Attribute\Exclude;

/**
* @extends PostRepository<SubReplyContent>
*/
/** @extends PostRepository<SubReplyContent> */
#[Exclude]
class SubReplyContentRepository extends PostContentRepository
{
Expand Down
4 changes: 1 addition & 3 deletions be/src/Repository/Post/ReplyRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\DependencyInjection\Attribute\Exclude;

/**
* @extends PostRepository<Reply>
*/
/** @extends PostRepository<Reply> */
#[Exclude]
class ReplyRepository extends PostRepository
{
Expand Down
4 changes: 1 addition & 3 deletions be/src/Repository/Post/SubReplyRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\DependencyInjection\Attribute\Exclude;

/**
* @extends PostRepository<SubReply>
*/
/** @extends PostRepository<SubReply> */
#[Exclude]
class SubReplyRepository extends PostRepository
{
Expand Down
4 changes: 1 addition & 3 deletions be/src/Repository/Post/ThreadRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\DependencyInjection\Attribute\Exclude;

/**
* @extends PostRepository<Thread>
*/
/** @extends PostRepository<Thread> */
#[Exclude]
class ThreadRepository extends PostRepository
{
Expand Down
1 change: 1 addition & 0 deletions be/src/Repository/Revision/AuthorExpGradeRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Doctrine\ORM\Query\ResultSetMapping;
use Doctrine\Persistence\ManagerRegistry;

/** @extends BaseRepository<AuthorExpGrade> */
class AuthorExpGradeRepository extends BaseRepository
{
public function __construct(ManagerRegistry $registry)
Expand Down
1 change: 1 addition & 0 deletions be/src/Repository/Revision/ForumModeratorRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Doctrine\ORM\Query\ResultSetMapping;
use Doctrine\Persistence\ManagerRegistry;

/** @extends BaseRepository<ForumModerator> */
class ForumModeratorRepository extends BaseRepository
{
public function __construct(ManagerRegistry $registry)
Expand Down
1 change: 1 addition & 0 deletions be/src/Repository/UserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use App\Entity\User;
use Doctrine\Persistence\ManagerRegistry;

/** @extends BaseRepository<User> */
class UserRepository extends BaseRepository
{
public function __construct(ManagerRegistry $registry)
Expand Down
2 changes: 2 additions & 0 deletions be/src/Validator/DateTimeRange.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

/** @noinspection PhpMultipleClassDeclarationsInspection */

namespace App\Validator;

use Symfony\Component\Validator\Constraint;
Expand Down

0 comments on commit 63881f6

Please sign in to comment.