Skip to content

Commit

Permalink
Remove useless todo's
Browse files Browse the repository at this point in the history
  • Loading branch information
lartist committed Aug 3, 2023
1 parent 7f12eab commit fec256c
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
'../src/Kernel.php',
]);

// Todo: Config about messenger.message_handler not tested
//Note: The config about messenger.message_handler is not tested, be careful when you want to modify it
$services->load('App\\PullRequest\\Application\\CommandHandler\\', '../src/PullRequest/Application/CommandHandler/')
->tag('messenger.message_handler');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public function requestChanges(): void
*/
public function addLabelByApprovalCount(array $committers): void
{
// Todo: use enum instead
$validApprovals = array_filter(
$this->approvals,
static fn (Approval $approval) => in_array($approval->author, $committers, true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public function moveColumnByLabel(string $label): void
*/
public function moveByApprovalCount(array $committers): void
{
// Todo: use enum
$validApprovals = array_filter(
$this->pullRequest->approvals,
static fn (Approval $approval) => in_array($approval->author, $committers, true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use App\PullRequestDashboard\Domain\Gateway\PullRequestCardRepositoryInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;

// Todo: to test and optimize
class GraphqlGithubPullRequestCardRepository implements PullRequestCardRepositoryInterface
{
public function __construct(private readonly HttpClientInterface $githubClient)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use App\PullRequest\Application\Command\RequestChangesCommand;
use App\Shared\Infrastructure\Factory\CommandFactory\CommandStrategyInterface;

// Todo: use enum
class RequestChangesStrategy implements CommandStrategyInterface
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function testHandle(array $originalLabels, PullRequestId $pullRequestId,
$pr = $this->prRepository->find(
new PullRequestId(repositoryOwner: $pullRequestId->repositoryOwner, repositoryName: $pullRequestId->repositoryName, pullRequestNumber: $pullRequestId->pullRequestNumber)
);
// todo : add enum instead

$this->assertEquals($expectedLabels, $pr->getLabels());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function testHandle(PullRequestId $pullRequestId, array $originalLabels):
));
/** @var PullRequest $pr */
$pr = $this->prRepository->find($pullRequestId);
// todo : add enum instead

$this->assertCount(
1,
array_filter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace App\Tests\PullRequest\Infrastructure\Adapter;

use App\PullRequest\Domain\Aggregate\PullRequest\PullRequestId;
use App\PullRequest\Infrastructure\Adapter\RestPullRequestRepository;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;

class RestPullRequestRepositoryTest extends KernelTestCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function testHandle(string $originalColumn, PullRequestCardId $pullReques
));
/** @var PullRequestCard $pullRequestCard */
$pullRequestCard = $this->pullRequestCardRepository->find($pullRequestCardId);
// Todo : add enum instead

$this->assertSame($expectedColumnName, $pullRequestCard->getColumnName());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function testHandle(string $originalColumn, string $label, string $expect
));
/** @var PullRequestCard $pullRequestCard */
$pullRequestCard = $this->pullRequestCardRepository->find($pullRequestCardId);
// todo : add enum instead

$this->assertSame($expectedColumn, $pullRequestCard->getColumnName());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@

namespace App\Tests\PullRequestDashboard\Infrastructure\Adapter;

use App\PullRequestDashboard\Domain\Aggregate\PullRequestCard\Approval;
use App\PullRequestDashboard\Domain\Aggregate\PullRequestCard\PullRequest;
use App\PullRequestDashboard\Domain\Aggregate\PullRequestCard\PullRequestCard;
use App\PullRequestDashboard\Domain\Aggregate\PullRequestCard\PullRequestCardId;
use App\PullRequestDashboard\Infrastructure\Adapter\GraphqlGithubPullRequestCardRepository;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;

class GraphqlGithubPullRequestCardRepositoryTest extends KernelTestCase
Expand Down

0 comments on commit fec256c

Please sign in to comment.