Conversation
@@ -125,7 +125,8 @@ public function getToRepublish(int $limit, ?int $offset = null): array | |||
*/ | |||
public function createQueue(QueueInterface $queueable): QueueEntityInterface | |||
{ | |||
return $this->entityFactory->createQueue($queueable); | |||
$queue = $this->entityFactory->createQueue($queueable); | |||
return $this->save($queue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Надо дополнить тест https://github.com/lamoda/queue-bundle/blob/master/tests/unit/Service/QueueServiceTest.php
Написал
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line before return statements, unless the return is alone inside a statement-group (like an if statement);
https://symfony.com/doc/current/contributing/code/standards.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, minors
|
||
$entityFactory = $this->getEntityFactory(); | ||
$entityFactory | ||
->expects($this->once()) #at least once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->once
is only once, not at least
@@ -125,7 +125,8 @@ public function getToRepublish(int $limit, ?int $offset = null): array | |||
*/ | |||
public function createQueue(QueueInterface $queueable): QueueEntityInterface | |||
{ | |||
return $this->entityFactory->createQueue($queueable); | |||
$queue = $this->entityFactory->createQueue($queueable); | |||
return $this->save($queue); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a blank line before return statements, unless the return is alone inside a statement-group (like an if statement);
https://symfony.com/doc/current/contributing/code/standards.html
Коммиты надо схлопнуть, наверное |
No description provided.