Skip to content

Commit

Permalink
Address CodeStyle issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MKodde committed Aug 28, 2024
1 parent edbe853 commit bbc84ff
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 22 deletions.
1 change: 0 additions & 1 deletion src/OpenConext/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,4 @@ public function getLogDir(): string
{
return $this->getCacheDir();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ public function __construct(

public function handle(
FindUserInformationQuery $query,
): InformationResponseInterface
{
): InformationResponseInterface {
return $this->informationService->readInformationFor($query->getCollabPersonId());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ public function __construct(

public function handle(
InactiveUsersQuery $query,
): LastLoginCollectionInterface
{
): LastLoginCollectionInterface {
return $this->lastLoginRepository->findDeprovisionCandidates($query->getInactivityPeriod());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ public function deprovision(
ProgressReporterInterface $progressReporter,
string $personId,
bool $dryRun = false,
): InformationResponseCollectionInterface
{
): InformationResponseCollectionInterface {
$this->logger->debug('Received a request to deprovision a user.');

$collabPersonId = $this->buildCollabPersonId($personId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public function __construct(
private readonly string $name,
) {
Assert::notEmpty(trim($name), 'Name can not be empty.');

}

public function getName(): string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ class CollabPersonId implements \Stringable
public function __construct(
string $collabUserId,
) {

$collabUserId = trim($collabUserId);

$collabUserId = trim($collabUserId);
if (empty($collabUserId)) {
throw new InvalidCollabPersonIdException('The collabPersonId must be a non empty string');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@

class InactivityPeriod
{

public function __construct(
#[Autowire(param: 'inactivity_period')]
private readonly int $inactivityPeriodInMonths,
) {
if ($inactivityPeriodInMonths <= 0) {
throw new InvalidInactivityPeriodException('The inactivity period must be an positive integer value');
}

}

public function getInactivityPeriodInMonths(): int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct(
private readonly ProgressReporterInterface $progressReporter,
private readonly LoggerInterface $logger,
) {
parent::__construct(null);
parent::__construct();
}

protected function configure(): void
Expand Down Expand Up @@ -108,14 +108,14 @@ protected function execute(
);
}
return $this->executeSingleUser(
$input,
$output,
$userIdInput,
$dryRun,
$noInteraction,
$outputOnlyJson,
$prettyJson,
);
$input,
$output,
$userIdInput,
$dryRun,
$noInteraction,
$outputOnlyJson,
$prettyJson,
);
}

private function executeBatch(
Expand Down

0 comments on commit bbc84ff

Please sign in to comment.