Skip to content

Commit

Permalink
fix(cs): run cs:fix
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Veyssier <[email protected]>
  • Loading branch information
julien-nc committed Aug 14, 2024
1 parent ee6b9b9 commit 5792a2f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/Controller/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ private function buildProtocolErrorResponse(?bool $throttle = null): TemplateRes
* @param string|null $redirectUrl
* @return DataDisplayResponse|RedirectResponse|TemplateResponse
*/
public function login(int $providerId, string $redirectUrl = null) {
public function login(int $providerId, ?string $redirectUrl = null) {
if ($this->userSession->isLoggedIn()) {
return new RedirectResponse($redirectUrl);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function createProvider(string $identifier, string $clientId, string $cli
return new JSONResponse(array_merge($provider->jsonSerialize(), ['settings' => $providerSettings]));
}

public function updateProvider(int $providerId, string $identifier, string $clientId, string $discoveryEndpoint, string $clientSecret = null,
public function updateProvider(int $providerId, string $identifier, string $clientId, string $discoveryEndpoint, ?string $clientSecret = null,
array $settings = [], string $scope = 'openid email profile', ?string $endSessionEndpoint = null): JSONResponse {
$provider = $this->providerMapper->getProvider($providerId);

Expand Down
6 changes: 3 additions & 3 deletions lib/Db/ProviderMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ public function getProviders() {
* @throws MultipleObjectsReturnedException
* @throws Exception
*/
public function createOrUpdateProvider(string $identifier, string $clientid = null,
string $clientsecret = null, string $discoveryuri = null, string $scope = 'openid email profile',
string $endsessionendpointuri = null) {
public function createOrUpdateProvider(string $identifier, ?string $clientid = null,
?string $clientsecret = null, ?string $discoveryuri = null, string $scope = 'openid email profile',
?string $endsessionendpointuri = null) {
try {
$provider = $this->findProviderByIdentifier($identifier);
} catch (DoesNotExistException $eNotExist) {
Expand Down
6 changes: 3 additions & 3 deletions tests/stubs/oc_core_command_base.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Base {

protected string $defaultOutputFormat = self::OUTPUT_FORMAT_PLAIN;

public function __construct(string $name = null) {
public function __construct(?string $name = null) {
}

protected function configure() {
Expand All @@ -36,7 +36,7 @@ public function setDescription(string $description) {
/**
* @return $this
*/
public function addOption(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null) {
public function addOption(string $name, $shortcut = null, ?int $mode = null, string $description = '', $default = null) {
}

public function getApplication(): ?Application {
Expand All @@ -51,7 +51,7 @@ public function getHelper(string $name) {
/**
* @return $this
*/
public function addArgument(string $name, int $mode = null, string $description = '', $default = null) {
public function addArgument(string $name, ?int $mode = null, string $description = '', $default = null) {
}

protected function writeArrayInOutputFormat(InputInterface $input, OutputInterface $output, array $items, string $prefix = ' - '): void {
Expand Down

0 comments on commit 5792a2f

Please sign in to comment.