Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/MedicalMundi/memu-job into …
Browse files Browse the repository at this point in the history
…main
  • Loading branch information
zerai committed Oct 1, 2024
2 parents 66a2fae + 9c67193 commit d40a67b
Show file tree
Hide file tree
Showing 17 changed files with 157 additions and 169 deletions.
261 changes: 123 additions & 138 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/backoffice/src/Adapter/HttpApi/ApiAdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class ApiAdminController extends AbstractController
{
#[route(path: '/api-backoffice', name: 'backoffice_api_home')]
#[Route(path: '/api-backoffice', name: 'backoffice_api_home')]
public function __invoke(): Response
{
return $this->json([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ final class CouldNotFindErrataFeed extends RuntimeException
public static function withId(ErrataId $errataId): self
{
return new CouldNotFindErrataFeed(
sprintf(
\sprintf(
'Could not find a errata feed item with id %s',
$errataId->toString()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ final class CouldNotPersistErrataFeed extends RuntimeException
public static function withId(ErrataId $errataId): self
{
return new CouldNotPersistErrataFeed(
sprintf(
\sprintf(
'Could not persist errata feed item with id %s',
$errataId->toString()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ final class ErrataFeedAlreadyExist extends RuntimeException
public static function withId(ErrataId $errataId): self
{
return new self(
sprintf(
\sprintf(
'Errata feed item with id %s already exist',
$errataId->toString()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ final class CouldNotFindJobFeed extends RuntimeException
public static function withId(JobId $jobId): self
{
return new self(
sprintf(
\sprintf(
'Could not find a job feed item with id %s',
$jobId->toString()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ final class CouldNotPersistJobFeed extends RuntimeException
public static function withId(JobId $jobId): self
{
return new self(
sprintf(
\sprintf(
'Could not persist job feed item with id %s',
$jobId->toString()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ final class JobFeedAlreadyExist extends RuntimeException
public static function withId(JobId $jobId): self
{
return new self(
sprintf(
\sprintf(
'Job feed item with id %s already exist',
$jobId->toString()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected function getOptions(DateTime $modifiedSince = null): array
'User-Agent' => $this->userAgent,
];
if ($modifiedSince) {
$headers['If-Modified-Since'] = $modifiedSince->format(\DateTime::RFC2822);
$headers['If-Modified-Since'] = $modifiedSince->format(DateTime::RFC2822);
}
return [
'http_errors' => false,
Expand Down
2 changes: 1 addition & 1 deletion core/ingesting/src/SharedKernel/Model/PublicationDate.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static function fromString(string $publicationDate): PublicationDate

private function __construct(string $publicationDate)
{
$this->publicationDate = new \DateTimeImmutable($publicationDate, new \DateTimeZone('UTC'));
$this->publicationDate = new DateTimeImmutable($publicationDate, new \DateTimeZone('UTC'));
}

public function toString(): string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DoctrineReadableJobRepositoryTest extends ReadableJobRepositoryContractTes
{
private ?ReadableJobFeedRepository $doctrineReadableJobFeedRepository;

private DoctrineJobFeedRepository$writeModel;
private DoctrineJobFeedRepository $writeModel;

protected function setUp(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function testNew(): void
{
$originalNumObjectsInRepository = \count($this->repository->findAll());

$this->client->request('GET', sprintf('%snew', $this->path));
$this->client->request('GET', \sprintf('%snew', $this->path));

self::assertResponseStatusCodeSame(200);

Expand Down Expand Up @@ -72,7 +72,7 @@ public function testShow(): void

$this->repository->add($fixture, true);

$this->client->request('GET', sprintf('%s%s', $this->path, $fixture->getId()->toString()));
$this->client->request('GET', \sprintf('%s%s', $this->path, $fixture->getId()->toString()));

self::assertResponseStatusCodeSame(200);
self::assertPageTitleContains('Dettaglio concorso | Administration MedicalJob');
Expand All @@ -91,7 +91,7 @@ public function testEdit(): void

$this->repository->add($fixture, true);

$this->client->request('GET', sprintf('%s%s/edit', $this->path, $fixture->getId()->toString()));
$this->client->request('GET', \sprintf('%s%s/edit', $this->path, $fixture->getId()->toString()));

$this->client->submitForm('Update', [
'concorso_article[title]' => 'Something New',
Expand Down Expand Up @@ -127,7 +127,7 @@ public function testRemove(): void

self::assertSame($originalNumObjectsInRepository + 1, \count($this->repository->findAll()));

$this->client->request('GET', sprintf('%s%s', $this->path, $fixture->getId()->toString()));
$this->client->request('GET', \sprintf('%s%s', $this->path, $fixture->getId()->toString()));
$this->client->submitForm('Elimina');

self::assertSame($originalNumObjectsInRepository, \count($this->repository->findAll()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function testNew(): void
{
$originalNumObjectsInRepository = \count($this->repository->findAll());

$this->client->request('GET', sprintf('%snew', $this->path));
$this->client->request('GET', \sprintf('%snew', $this->path));

self::assertResponseStatusCodeSame(200);

Expand All @@ -70,7 +70,7 @@ public function testShow(): void

$this->repository->add($fixture, true);

$this->client->request('GET', sprintf('%s%s', $this->path, $fixture->getId()));
$this->client->request('GET', \sprintf('%s%s', $this->path, $fixture->getId()));

self::assertResponseStatusCodeSame(200);
self::assertPageTitleContains('JobArticle');
Expand All @@ -88,7 +88,7 @@ public function testEdit(): void

$this->repository->add($fixture, true);

$this->client->request('GET', sprintf('%s%s/edit', $this->path, $fixture->getId()));
$this->client->request('GET', \sprintf('%s%s/edit', $this->path, $fixture->getId()));

$this->client->submitForm('Update', [
'job_article[title]' => 'Something New',
Expand Down Expand Up @@ -121,7 +121,7 @@ public function testRemove(): void

self::assertSame($originalNumObjectsInRepository + 1, \count($this->repository->findAll()));

$this->client->request('GET', sprintf('%s%s', $this->path, $fixture->getId()));
$this->client->request('GET', \sprintf('%s%s', $this->path, $fixture->getId()));
$this->client->submitForm('Delete');

self::assertSame($originalNumObjectsInRepository, \count($this->repository->findAll()));
Expand Down
2 changes: 1 addition & 1 deletion src/Repository/BackofficeUserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function remove(BackofficeUser $entity, bool $flush = false): void
public function upgradePassword(PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void
{
if (! $user instanceof BackofficeUser) {
throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', $user::class));
throw new UnsupportedUserException(\sprintf('Instances of "%s" are not supported.', $user::class));
}

$user->setPassword($newHashedPassword);
Expand Down
2 changes: 1 addition & 1 deletion tests/Behat/AcceptanceContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function () use ($locator) {
$element = $this->getSession()->getPage()->find('css', $locator);
Assert::notNull(
$element,
sprintf(
\sprintf(
'locator "%s" not found on page %s',
$locator,
$this->getSession()->getCurrentUrl()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function testRouterConfigurationEndPoint(): void
$expectedRouteMapFile = __DIR__ . '/Fixture/expected_route_map.json';

if ((bool) getenv('UT')) {
(new FileSystem())->dumpFile($expectedRouteMapFile, $currentRouteMapJson);
(new Filesystem())->dumpFile($expectedRouteMapFile, $currentRouteMapJson);
}

self::assertJsonStringEqualsJsonFile(
Expand Down
23 changes: 13 additions & 10 deletions tools/ecs/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d40a67b

Please sign in to comment.